pub enum ShutdownReason {
Show 14 variants
UserRequest,
DeveloperRequest,
SystemUpdate,
RetrySystemUpdate,
HighTemperature,
FactoryDataReset,
SessionFailure,
CriticalComponentFailure,
ZbiSwap,
OutOfMemory,
NetstackMigration,
AndroidUnexpectedReason,
AndroidRescueParty,
AndroidCriticalProcessFailure,
// some variants omitted
}
Expand description
Why the system is shutting down.
Variants§
UserRequest
The end user of the device initiated the shutdown.
DO NOT USE for any code path not directly related to an end user explicit shutdown action. Use DEVELOPER_REQUEST below instead.
DeveloperRequest
The developer initiated the shutdown, typically via a shell command or similar interface, including within an automated test.
SystemUpdate
A new system update has been downloaded.
RetrySystemUpdate
Applying the system update has failed.
HighTemperature
The device has crossed the high temperature threshold.
FactoryDataReset
The device is about to perform an FDR.
SessionFailure
Sessionmgr has failed.
CriticalComponentFailure
A critical system component has failed.
ZbiSwap
A boot partition change was effected.
OutOfMemory
The system hit a critical low threshold of available memory.
NetstackMigration
The Netstack component is changing versions.
AndroidUnexpectedReason
An Android-initiated shutdown reason that Starnix doesn’t recognize.
AndroidRescueParty
Android called for the “RescueParty”.
AndroidCriticalProcessFailure
A critical Android process failed.
Implementations§
Source§impl ShutdownReason
impl ShutdownReason
pub fn from_primitive(prim: u32) -> Option<ShutdownReason>
pub fn from_primitive_allow_unknown(prim: u32) -> ShutdownReason
pub fn unknown() -> ShutdownReason
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl Clone for ShutdownReason
impl Clone for ShutdownReason
Source§fn clone(&self) -> ShutdownReason
fn clone(&self) -> ShutdownReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ShutdownReason
impl Debug for ShutdownReason
Source§impl<D> Decode<ShutdownReason, D> for ShutdownReasonwhere
D: ResourceDialect,
impl<D> Decode<ShutdownReason, D> for ShutdownReasonwhere
D: ResourceDialect,
Source§fn new_empty() -> ShutdownReason
fn new_empty() -> ShutdownReason
Self
. The specific value does not matter,
since it will be overwritten by decode
.Source§impl<D> Encode<ShutdownReason, D> for ShutdownReasonwhere
D: ResourceDialect,
impl<D> Encode<ShutdownReason, D> for ShutdownReasonwhere
D: ResourceDialect,
Source§impl Hash for ShutdownReason
impl Hash for ShutdownReason
Source§impl Ord for ShutdownReason
impl Ord for ShutdownReason
Source§fn cmp(&self, other: &ShutdownReason) -> Ordering
fn cmp(&self, other: &ShutdownReason) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ShutdownReason
impl PartialEq for ShutdownReason
Source§impl PartialOrd for ShutdownReason
impl PartialOrd for ShutdownReason
Source§impl TypeMarker for ShutdownReason
impl TypeMarker for ShutdownReason
Source§type Owned = ShutdownReason
type Owned = ShutdownReason
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for ShutdownReason
impl ValueTypeMarker for ShutdownReason
Source§type Borrowed<'a> = ShutdownReason
type Borrowed<'a> = ShutdownReason
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreSource§fn borrow(
value: &<ShutdownReason as TypeMarker>::Owned,
) -> <ShutdownReason as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<ShutdownReason as TypeMarker>::Owned, ) -> <ShutdownReason as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.