Skip to main content

ZirconCrashReason

Enum ZirconCrashReason 

Source
#[repr(u32)]
pub enum ZirconCrashReason { Invalid = 0, Unknown = 1, NoCrash = 2, Oom = 3, Panic = 4, SoftwareWatchdog = 5, UserspaceRootJobTermination = 6, }
Expand description

TODO(https://fxbug.dev/534467534): For now, these values are copied from zircon/system/public/zircon/boot/crash-reason.h.

Variants§

§

Invalid = 0

0 is reserved for “Invalid”. It will never be used by a functioning crash-logger.

§

Unknown = 1

“Unknown” indicates that the system does not know the reason for a recent crash. The primary use of this reason is to be something which can be left in the crashlog in case the system spontaneously reboots without a chance to gracefully finalize the log, perhaps because of something like a hardware watchdog timer.

§

NoCrash = 2

“No Crash” indicates that the system deliberately rebooted in an orderly fashion. No crash occurred.

§

Oom = 3

“OOM” indicates a crash triggered by the system because of an unrecoverable out-of-memory situation.

§

Panic = 4

“Panic” indicates a crash triggered by the system because of an unrecoverable kernel panic situation.

§

SoftwareWatchdog = 5

“Software watchdog” indicates a crash triggered by a kernel level software watchdog construct. Note that this is distinct from a hardware based WDT. If the system reboots because of a hardware watchdog, it will have no chance to record the reboot reason, and the crashlog will indicate “unknown”. The HW reboot reason may be known, but only if the bootloader reports it to us.

§

UserspaceRootJobTermination = 6

“Userspace root job termination” indicates a crash triggered by the system because it detected the termination of the userspace root job, most likely because one of its critical processes crashed.

Trait Implementations§

Source§

impl Clone for ZirconCrashReason

Source§

fn clone(&self) -> ZirconCrashReason

Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ZirconCrashReason

Source§

impl Debug for ZirconCrashReason

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ZirconCrashReason

Source§

impl PartialEq for ZirconCrashReason

Source§

fn eq(&self, other: &ZirconCrashReason) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable)§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ZirconCrashReason

Auto Trait Implementations§

§

impl Freeze for ZirconCrashReason

§

impl RefUnwindSafe for ZirconCrashReason

§

impl Send for ZirconCrashReason

§

impl Sync for ZirconCrashReason

§

impl Unpin for ZirconCrashReason

§

impl UnsafeUnpin for ZirconCrashReason

§

impl UnwindSafe for ZirconCrashReason

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.