Skip to main content

PanicCode

Enum PanicCode 

Source
#[repr(u16)]
pub enum PanicCode {
Show 28 variants Unknown = 0, ManuallyTriggeredPanic = 1, InitFailure = 2, IllegalInterrupt = 153, DivideError = 256, NmiHardwareFailiure = 258, Overflow = 260, InvalidOpcode = 262, DeviceNotAvail = 263, DoubleFault = 264, InvalidTss = 272, SegmentNotPresent = 273, StackSegmentFault = 274, GeneralProtectionFault = 275, PageFault = 276, X87FloatingPoint = 278, AlignmentCheck = 279, MachineCheck = 280, SimdFloatingPoint = 281, Virtualization = 288, VmmCommunicationException = 297, SecurityException = 304, NoValidMemMapEntry = 768, DoubleFree = 769, IllegalFree = 770, OutOfMemory = 771, InvalidPageOperation = 800, InvalidPsf2MagicNumber = 4_096,
}
Expand description

Numeric (u16) classification of the reason for a kernel panic.

Variants§

§

Unknown = 0

§

ManuallyTriggeredPanic = 1

§

InitFailure = 2

§

IllegalInterrupt = 153

§

DivideError = 256

§

NmiHardwareFailiure = 258

§

Overflow = 260

§

InvalidOpcode = 262

§

DeviceNotAvail = 263

§

DoubleFault = 264

§

InvalidTss = 272

§

SegmentNotPresent = 273

§

StackSegmentFault = 274

§

GeneralProtectionFault = 275

§

PageFault = 276

§

X87FloatingPoint = 278

§

AlignmentCheck = 279

§

MachineCheck = 280

§

SimdFloatingPoint = 281

§

Virtualization = 288

§

VmmCommunicationException = 297

§

SecurityException = 304

§

NoValidMemMapEntry = 768

§

DoubleFree = 769

§

IllegalFree = 770

§

OutOfMemory = 771

§

InvalidPageOperation = 800

§

InvalidPsf2MagicNumber = 4_096

Implementations§

Source§

impl PanicCode

Source

pub fn as_str(&self) -> &'static str

Return the variant name as a static string, suitable for printing in a panic message.

Auto Trait Implementations§

§

impl Freeze for PanicCode

§

impl RefUnwindSafe for PanicCode

§

impl Send for PanicCode

§

impl Sync for PanicCode

§

impl Unpin for PanicCode

§

impl UnsafeUnpin for PanicCode

§

impl UnwindSafe for PanicCode

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> 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.