pub struct SplitDescriptorChain {
index: Option<u16>,
count: u16,
queue_size: u16,
desc_table: GuestAddress,
}Expand description
Iterator over the descriptors of a split virtqueue descriptor chain.
Fields§
§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.
queue_size: u16§desc_table: GuestAddressImplementations§
Source§impl SplitDescriptorChain
impl SplitDescriptorChain
Sourcepub fn new(
desc_table: GuestAddress,
queue_size: u16,
index: u16,
) -> SplitDescriptorChain
pub fn new( desc_table: GuestAddress, queue_size: u16, index: u16, ) -> SplitDescriptorChain
Construct a new iterator over a split virtqueue descriptor chain.
§Arguments
desc_table- Guest physical address of the descriptor table.queue_size- Total number of entries in the descriptor table.index- The index of the first descriptor in the chain.
Trait Implementations§
Source§impl DescriptorChainIter for SplitDescriptorChain
impl DescriptorChainIter for SplitDescriptorChain
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 SplitDescriptorChain
impl RefUnwindSafe for SplitDescriptorChain
impl Send for SplitDescriptorChain
impl Sync for SplitDescriptorChain
impl Unpin for SplitDescriptorChain
impl UnwindSafe for SplitDescriptorChain
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