#[repr(i32)]pub enum CpuMode {
ModeUnknown = 0,
ModeKernel = 1,
ModeUser = 2,
ModeHypervisor = 3,
ModeGuestKernel = 4,
ModeGuestUser = 5,
}
Variants§
ModeUnknown = 0
ModeKernel = 1
ModeUser = 2
ModeHypervisor = 3
The following values aren’t expected, but included for completeness:
ModeGuestKernel = 4
ModeGuestUser = 5
Implementations§
Source§impl CpuMode
impl CpuMode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Ord for CpuMode
impl Ord for CpuMode
Source§impl PartialOrd for CpuMode
impl PartialOrd for CpuMode
impl Copy for CpuMode
impl Eq for CpuMode
impl StructuralPartialEq for CpuMode
Auto Trait Implementations§
impl Freeze for CpuMode
impl RefUnwindSafe for CpuMode
impl Send for CpuMode
impl Sync for CpuMode
impl Unpin for CpuMode
impl UnwindSafe for CpuMode
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