Struct Used

Source
#[repr(C, align(4))]
pub struct Used { pub flags: UsedF, pub idx: le16, /* private fields */ }
Expand description

The Virtqueue Used Ring

Fields§

§flags: UsedF§idx: le16

Implementations§

Source§

impl Used

Source

pub fn new(queue_size: u16, has_event_idx: bool) -> Box<Self>

Source

pub fn try_new( queue_size: u16, has_event_idx: bool, ) -> Result<Box<Self>, AllocError>

Source

pub fn new_in<A: Allocator>( queue_size: u16, has_event_idx: bool, alloc: A, ) -> Box<Self, A>

Source

pub fn try_new_in<A: Allocator>( queue_size: u16, has_event_idx: bool, alloc: A, ) -> Result<Box<Self, A>, AllocError>

Source§

impl Used

Source

pub fn layout(queue_size: u16, has_event_idx: bool) -> Layout

Source

pub fn from_ptr( ptr: NonNull<[u8]>, has_event_idx: bool, ) -> Option<NonNull<Self>>

Source

pub fn ring_ptr(this: NonNull<Self>) -> NonNull<[UsedElem]>

Source

pub fn ring(&self) -> &[UsedElem]

Source

pub fn ring_mut(&mut self) -> &mut [UsedElem]

Source

pub fn avail_event_ptr(this: NonNull<Self>) -> Option<NonNull<le16>>

Source

pub fn avail_event(&self) -> Option<&le16>

Source

pub fn avail_event_mut(&mut self) -> Option<&mut le16>

Trait Implementations§

Source§

impl Debug for Used

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Used

§

impl RefUnwindSafe for Used

§

impl Send for Used

§

impl !Sized for Used

§

impl Sync for Used

§

impl Unpin for Used

§

impl UnwindSafe for Used

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