pub enum DeviceStatus {
Reset = 0,
Acknowledge = 1,
Driver = 2,
DriverOK = 4,
FeaturesOK = 8,
DeviceNeedReset = 64,
Failed = 128,
}
Expand description
DeviceStatus enum for Virtio devices
This enum represents the status of the Virtio device. Each variant corresponds to a specific status bit. The status bits are defined in the Virtio specification.
Variants§
Implementations§
Source§impl DeviceStatus
impl DeviceStatus
Sourcepub fn set(&self, status: &mut u32)
pub fn set(&self, status: &mut u32)
Set the status bit
This method sets the specified status bit in the given status.
§Arguments
status
- A mutable reference to the status to modify.
Sourcepub fn clear(&self, status: &mut u32)
pub fn clear(&self, status: &mut u32)
Clear the status bit
This method clears the specified status bit in the given status.
§Arguments
status
- A mutable reference to the status to modify.
Sourcepub fn toggle(&self, status: &mut u32)
pub fn toggle(&self, status: &mut u32)
Toggle the status bit
This method toggles the specified status bit in the given status.
§Arguments
status
- A mutable reference to the status to modify.
Trait Implementations§
Source§impl Clone for DeviceStatus
impl Clone for DeviceStatus
Source§fn clone(&self) -> DeviceStatus
fn clone(&self) -> DeviceStatus
Returns a copy of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DeviceStatus
impl Debug for DeviceStatus
impl Copy for DeviceStatus
Auto Trait Implementations§
impl Freeze for DeviceStatus
impl RefUnwindSafe for DeviceStatus
impl Send for DeviceStatus
impl Sync for DeviceStatus
impl Unpin for DeviceStatus
impl UnwindSafe for DeviceStatus
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)