#[non_exhaustive]
pub enum RebootReason {
Show 18 variants
Unknown,
Cold,
BriefPowerLoss,
Brownout,
KernelPanic,
SystemOutOfMemory,
HardwareWatchdogTimeout,
SoftwareWatchdogTimeout,
RootJobTermination,
UserRequest,
SystemUpdate,
RetrySystemUpdate,
HighTemperature,
SessionFailure,
SysmgrFailure,
FactoryDataReset,
CriticalComponentFailure,
ZbiSwap,
// some variants omitted
}
Expand description
Reasons why a device last rebooted.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown
The client will get this value if the server is sending a new enum value that the client was not compiled with.
Cold
The device booted from a cold state.
This is most likely the result of an extended period of time without power or a device booting with Fuchsia for the first time.
BriefPowerLoss
The device rebooted due to a brief loss of power.
On some hardware this could be the result of a user disconnecting, then reconnecting their device’s power supply in rapid succession.
Brownout
The device rebooted because its voltage dipped below an allowable level without going to 0.
KernelPanic
SystemOutOfMemory
HardwareWatchdogTimeout
SoftwareWatchdogTimeout
RootJobTermination
The device rebooted because the userspace root job was terminated, most likely because one of its critical processes crashed.
UserRequest
The device rebooted because a user of the device initiated the reboot. A user can be a human or a program that interacts with the device on behalf of a human, such as SL4F or RCS.
SystemUpdate
The device rebooted because of an OTA.
RetrySystemUpdate
The device rebooted because applying the OTA failed and we want to retry.
HighTemperature
The device rebooted because it was determined to be too hot.
SessionFailure
The device rebooted because of an issue with a session or because the session manager was unable to recover from an error.
SysmgrFailure
The device rebooted because the system manager (sysmgr) was unable to recover from an error.
FactoryDataReset
The device rebooted following a data reset to factory defaults.
See [fuchsia.recovery.FactoryReset
].
CriticalComponentFailure
The device rebooted because a critical component managed by sysmgr has failed.
ZbiSwap
The device rebooted to apply the swap of Zircon boot images.
Implementations§
source§impl RebootReason
impl RebootReason
pub fn from_primitive(prim: u16) -> Option<Self>
pub fn from_primitive_allow_unknown(prim: u16) -> Self
pub fn unknown() -> Self
pub const fn into_primitive(self) -> u16
pub fn is_unknown(&self) -> bool
Trait Implementations§
source§impl Clone for RebootReason
impl Clone for RebootReason
source§fn clone(&self) -> RebootReason
fn clone(&self) -> RebootReason
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RebootReason
impl Debug for RebootReason
source§impl Decodable for RebootReason
impl Decodable for RebootReason
source§fn decode(
&mut self,
decoder: &mut Decoder<'_>,
offset: usize
) -> Result<(), Error>
fn decode( &mut self, decoder: &mut Decoder<'_>, offset: usize ) -> Result<(), Error>
self
.
Callers must ensure that offset
is a multiple of
Layout::inline_align
, and that decoder.buf
has room for reading
Layout::inline_size
bytes at offset
. Read moresource§impl Encodable for RebootReason
impl Encodable for RebootReason
source§fn encode(
&mut self,
encoder: &mut Encoder<'_, '_>,
offset: usize,
recursion_depth: usize
) -> Result<(), Error>
fn encode( &mut self, encoder: &mut Encoder<'_, '_>, offset: usize, recursion_depth: usize ) -> Result<(), Error>
Handle::INVALID
. Callers must ensure that offset
is a
multiple of Layout::inline_align
, and that encoder.buf
has room for
writing Layout::inline_size
bytes at offset
. Read moresource§impl Hash for RebootReason
impl Hash for RebootReason
source§impl Layout for RebootReason
impl Layout for RebootReason
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
.§fn supports_simple_copy() -> boolwhere
Self: Sized,
fn supports_simple_copy() -> boolwhere Self: Sized,
source§impl Ord for RebootReason
impl Ord for RebootReason
source§fn cmp(&self, other: &RebootReason) -> Ordering
fn cmp(&self, other: &RebootReason) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<RebootReason> for RebootReason
impl PartialEq<RebootReason> for RebootReason
source§fn eq(&self, other: &RebootReason) -> bool
fn eq(&self, other: &RebootReason) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<RebootReason> for RebootReason
impl PartialOrd<RebootReason> for RebootReason
source§fn partial_cmp(&self, other: &RebootReason) -> Option<Ordering>
fn partial_cmp(&self, other: &RebootReason) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for RebootReason
impl Eq for RebootReason
impl StructuralEq for RebootReason
impl StructuralPartialEq for RebootReason
Auto Trait Implementations§
impl RefUnwindSafe for RebootReason
impl Send for RebootReason
impl Sync for RebootReason
impl Unpin for RebootReason
impl UnwindSafe for RebootReason
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> LayoutObject for Twhere
T: Layout,
impl<T> LayoutObject for Twhere T: Layout,
§fn inline_align(&self, context: &Context) -> usize
fn inline_align(&self, context: &Context) -> usize
Layout::inline_align
.§fn inline_size(&self, context: &Context) -> usize
fn inline_size(&self, context: &Context) -> usize
Layout::inline_size
.