pub enum Priv {
User,
Supervisor,
Machine,
}Expand description
Privilege level, held in one trit.
Three levels in one trit is the encoding a ternary machine gets for free. A binary machine spends two bits on three levels and leaves one combination meaning nothing.
Variants§
User
Unprivileged. No control registers, no device addresses.
Supervisor
The operating system.
Machine
Firmware. Address translation does not apply.
Implementations§
Trait Implementations§
impl Copy for Priv
impl Eq for Priv
Source§impl Ord for Priv
impl Ord for Priv
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Priv
impl PartialOrd for Priv
impl StructuralPartialEq for Priv
Auto Trait Implementations§
impl Freeze for Priv
impl RefUnwindSafe for Priv
impl Send for Priv
impl Sync for Priv
impl Unpin for Priv
impl UnsafeUnpin for Priv
impl UnwindSafe for Priv
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more