Struct vmm_vhost::message::VhostUserVringAddr
source · #[repr(C, packed(1))]pub struct VhostUserVringAddr {
pub index: u32,
pub flags: u32,
pub descriptor: u64,
pub used: u64,
pub available: u64,
pub log: u64,
}
Expand description
Vring address descriptor.
Fields§
§index: u32
Vring index.
flags: u32
Vring flags defined by VhostUserVringAddrFlags.
descriptor: u64
Ring address of the vring descriptor table.
used: u64
Ring address of the vring used ring.
available: u64
Ring address of the vring available ring.
log: u64
Guest address for logging.
Implementations§
source§impl VhostUserVringAddr
impl VhostUserVringAddr
sourcepub fn new(
index: u32,
flags: VhostUserVringAddrFlags,
descriptor: u64,
used: u64,
available: u64,
log: u64
) -> Self
pub fn new( index: u32, flags: VhostUserVringAddrFlags, descriptor: u64, used: u64, available: u64, log: u64 ) -> Self
Create a new instance.
sourcepub fn from_config_data(index: u32, config_data: &VringConfigData) -> Self
pub fn from_config_data(index: u32, config_data: &VringConfigData) -> Self
Create a new instance from VringConfigData
.
Trait Implementations§
source§impl AsBytes for VhostUserVringAddr
impl AsBytes for VhostUserVringAddr
§fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
Gets the bytes of this value mutably. Read more
§fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>
fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>
source§impl Clone for VhostUserVringAddr
impl Clone for VhostUserVringAddr
source§fn clone(&self) -> VhostUserVringAddr
fn clone(&self) -> VhostUserVringAddr
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for VhostUserVringAddr
impl Default for VhostUserVringAddr
source§fn default() -> VhostUserVringAddr
fn default() -> VhostUserVringAddr
Returns the “default value” for a type. Read more
source§impl FromBytes for VhostUserVringAddr
impl FromBytes for VhostUserVringAddr
§fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized,
fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized,
Interprets the prefix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized,
fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized,
Interprets the suffix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + AsBytes,
fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + AsBytes,
Interprets the prefix of the given
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + AsBytes,
fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + AsBytes,
Interprets the suffix of the given
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
source§impl FromZeroes for VhostUserVringAddr
impl FromZeroes for VhostUserVringAddr
impl Copy for VhostUserVringAddr
Auto Trait Implementations§
impl RefUnwindSafe for VhostUserVringAddr
impl Send for VhostUserVringAddr
impl Sync for VhostUserVringAddr
impl Unpin for VhostUserVringAddr
impl UnwindSafe for VhostUserVringAddr
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