Struct Avail

Source
#[repr(C)]
pub struct Avail { pub flags: AvailF, pub idx: le16, /* private fields */ }
Expand description

The Virtqueue Available Ring

Fields§

§flags: AvailF§idx: le16

Implementations§

Source§

impl Avail

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 Avail

Source

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

Source

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

Source

pub fn ring_ptr(this: NonNull<Self>, has_event_idx: bool) -> NonNull<[le16]>

Source

pub fn ring(&self, has_event_idx: bool) -> &[le16]

Source

pub fn ring_mut(&mut self, has_event_idx: bool) -> &mut [le16]

Source

pub fn used_event_ptr( this: NonNull<Self>, has_event_idx: bool, ) -> Option<NonNull<le16>>

Source

pub fn used_event(&self, has_event_idx: bool) -> Option<&le16>

Source

pub fn used_event_mut(&mut self, has_event_idx: bool) -> Option<&mut le16>

Trait Implementations§

Source§

impl Debug for Avail

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Avail

§

impl RefUnwindSafe for Avail

§

impl Send for Avail

§

impl !Sized for Avail

§

impl Sync for Avail

§

impl Unpin for Avail

§

impl UnwindSafe for Avail

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