Struct PeekedDescriptorChain

Source
pub struct PeekedDescriptorChain<'q> {
    queue: &'q mut Queue,
    desc_chain: DescriptorChain,
}
Expand description

A DescriptorChain that has been peeked from a Queue but not popped yet.

Call pop() to pop this descriptor chain from the Queue and receive the contained DescriptorChain object.

This object holds a mutable reference to the Queue to ensure it is not possible to pop or peek another descriptor while a peek is already active. Either pop() or drop this object before attempting to manipulate the Queue again.

Fields§

§queue: &'q mut Queue§desc_chain: DescriptorChain

Implementations§

Source§

impl<'q> PeekedDescriptorChain<'q>

Source

fn new(queue: &'q mut Queue, desc_chain: DescriptorChain) -> Self

Create a PeekedDescriptorChain that holds a mutable reference to its Queue. Use Queue::peek() rather than calling this function.

Source

pub fn pop(self) -> DescriptorChain

Pop this descriptor chain from the queue.

Methods from Deref<Target = DescriptorChain>§

Source

pub fn mem(&self) -> &GuestMemory

Returns a reference to the GuestMemory instance.

Source

pub fn index(&self) -> u16

Returns the index of the first descriptor in the chain.

Trait Implementations§

Source§

impl Deref for PeekedDescriptorChain<'_>

Source§

type Target = DescriptorChain

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for PeekedDescriptorChain<'_>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V