pub struct PackedDescriptorChain {
avail_wrap_counter: bool,
index: Option<u16>,
count: u16,
id: Option<u16>,
queue_size: u16,
desc_table: GuestAddress,
}Fields§
§avail_wrap_counter: bool§index: Option<u16>Current descriptor index within desc_table, or None if the iterator is exhausted.
count: u16Number of descriptors returned by the iterator already.
If count reaches queue_size, the chain has a loop and is therefore invalid.
id: Option<u16>Buffer Id, which locates at the last descriptor in the chain
queue_size: u16§desc_table: GuestAddressImplementations§
Source§impl PackedDescriptorChain
impl PackedDescriptorChain
Sourcepub fn new(
desc_table: GuestAddress,
queue_size: u16,
avail_wrap_counter: bool,
index: u16,
) -> PackedDescriptorChain
pub fn new( desc_table: GuestAddress, queue_size: u16, avail_wrap_counter: bool, index: u16, ) -> PackedDescriptorChain
Construct a new iterator over a packed virtqueue descriptor chain.
§Arguments
desc_table- Guest physical address of the descriptor table.queue_size- Total number of entries in the descriptor table.avail_wrap_counter- Current device wrap counter polarity.index- The index of the first descriptor in the chain.
Trait Implementations§
Source§impl DescriptorChainIter for PackedDescriptorChain
impl DescriptorChainIter for PackedDescriptorChain
Source§fn next(&mut self, mem: &GuestMemory) -> Result<Option<Descriptor>>
fn next(&mut self, mem: &GuestMemory) -> Result<Option<Descriptor>>
Return the next descriptor in the chain, or
None if there are no more descriptors.Auto Trait Implementations§
impl Freeze for PackedDescriptorChain
impl RefUnwindSafe for PackedDescriptorChain
impl Send for PackedDescriptorChain
impl Sync for PackedDescriptorChain
impl Unpin for PackedDescriptorChain
impl UnwindSafe for PackedDescriptorChain
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