Struct VirtioMmioHeader

Source
#[repr(C)]
pub struct VirtioMmioHeader {
Show 24 fields pub magic: Volatile<u32, Read>, pub version: Volatile<u32, Read>, pub device_id: Volatile<u32, Read>, pub vendor_id: Volatile<u32, Read>, pub device_features: Volatile<u32, Read>, pub device_feature_select: Volatile<u32, Write>, pub driver_features: Volatile<u32, Write>, pub driver_feature_select: Volatile<u32, Write>, pub queue_select: Volatile<u32, Write>, pub queue_size_max: Volatile<u32, Read>, pub queue_size: Volatile<u32, ReadWrite>, pub queue_ready: Volatile<u32, ReadWrite>, pub queue_notify: Volatile<u32, Write>, pub interrupt_status: Volatile<u32, Read>, pub interrupt_ack: Volatile<u32, Write>, pub status: Volatile<u32, ReadWrite>, pub queue_descriptor: Volatile<[u32; 2], ReadWrite>, pub queue_driver: Volatile<[u32; 2], ReadWrite>, pub queue_device: Volatile<[u32; 2], ReadWrite>, pub shared_memory_select: Volatile<u32, Write>, pub shared_memory_len: Volatile<[u32; 2], Read>, pub shared_memory_base: Volatile<[u32; 2], Read>, pub queue_reset: Volatile<u32, ReadWrite>, pub config_generation: Volatile<u32, Read>, /* private fields */
}

Fields§

§magic: Volatile<u32, Read>§version: Volatile<u32, Read>§device_id: Volatile<u32, Read>§vendor_id: Volatile<u32, Read>§device_features: Volatile<u32, Read>§device_feature_select: Volatile<u32, Write>§driver_features: Volatile<u32, Write>§driver_feature_select: Volatile<u32, Write>§queue_select: Volatile<u32, Write>§queue_size_max: Volatile<u32, Read>§queue_size: Volatile<u32, ReadWrite>§queue_ready: Volatile<u32, ReadWrite>§queue_notify: Volatile<u32, Write>§interrupt_status: Volatile<u32, Read>§interrupt_ack: Volatile<u32, Write>§status: Volatile<u32, ReadWrite>§queue_descriptor: Volatile<[u32; 2], ReadWrite>§queue_driver: Volatile<[u32; 2], ReadWrite>§queue_device: Volatile<[u32; 2], ReadWrite>§shared_memory_select: Volatile<u32, Write>§shared_memory_len: Volatile<[u32; 2], Read>§shared_memory_base: Volatile<[u32; 2], Read>§queue_reset: Volatile<u32, ReadWrite>§config_generation: Volatile<u32, Read>

Implementations§

Source§

impl VirtioMmioHeader

Source

pub fn reset(&mut self)

Source

pub fn set_status_flag(&mut self, flag: StatusFlags)

Source

pub fn is_magic_valid(&self) -> bool

Source

pub fn device_type(&self) -> Result<DeviceType, ()>

Source

pub fn is_status_flag_set(&self, flag: StatusFlags) -> bool

Source

pub fn set_queue_descriptor(&mut self, physical: u64)

Source

pub fn set_queue_driver(&mut self, physical: u64)

Source

pub fn set_queue_device(&mut self, physical: u64)

Source

pub fn mark_queue_ready(&mut self)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.