#[repr(u8)]
pub enum PrivilegeLevel {
    Ring0,
    Ring1,
    Ring2,
    Ring3,
}
Expand description

Represents a protection ring level.

Variants

Ring0

Privilege-level 0 (most privilege): This level is used by critical system-software components that require direct access to, and control over, all processor and system resources. This can include BIOS, memory-management functions, and interrupt handlers.

Ring1

Privilege-level 1 (moderate privilege): This level is used by less-critical system- software services that can access and control a limited scope of processor and system resources. Software running at these privilege levels might include some device drivers and library routines. The actual privileges of this level are defined by the operating system.

Ring2

Privilege-level 2 (moderate privilege): Like level 1, this level is used by less-critical system-software services that can access and control a limited scope of processor and system resources. The actual privileges of this level are defined by the operating system.

Ring3

Privilege-level 3 (least privilege): This level is used by application software. Software running at privilege-level 3 is normally prevented from directly accessing most processor and system resources. Instead, applications request access to the protected processor and system resources by calling more-privileged service routines to perform the accesses.

Implementations

Creates a PrivilegeLevel from a numeric value. The value must be in the range 0..4.

This function panics if the passed value is >3.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.