pub struct Avail {
pub flags: AvailF,
pub idx: le16,
/* private fields */
}Expand description
The Virtqueue Available Ring
Fields§
§flags: AvailF§idx: le16Implementations§
Source§impl Avail
impl Avail
pub fn new(queue_size: u16, has_event_idx: bool) -> Box<Self>
Available on crate feature
alloc only.pub fn try_new( queue_size: u16, has_event_idx: bool, ) -> Result<Box<Self>, AllocError>
Available on crate feature
alloc only.pub fn new_in<A: Allocator>( queue_size: u16, has_event_idx: bool, alloc: A, ) -> Box<Self, A>
Available on crate feature
alloc only.pub fn try_new_in<A: Allocator>( queue_size: u16, has_event_idx: bool, alloc: A, ) -> Result<Box<Self, A>, AllocError>
Available on crate feature
alloc only.Source§impl Avail
impl Avail
pub fn layout(queue_size: u16, has_event_idx: bool) -> Layout
pub fn from_ptr(ptr: NonNull<[u8]>) -> Option<NonNull<Self>>
pub fn ring_ptr(this: NonNull<Self>, has_event_idx: bool) -> NonNull<[le16]>
pub fn ring(&self, has_event_idx: bool) -> &[le16] ⓘ
pub fn ring_mut(&mut self, has_event_idx: bool) -> &mut [le16] ⓘ
pub fn used_event_ptr( this: NonNull<Self>, has_event_idx: bool, ) -> Option<NonNull<le16>>
pub fn used_event(&self, has_event_idx: bool) -> Option<&le16>
pub fn used_event_mut(&mut self, has_event_idx: bool) -> Option<&mut le16>
Trait Implementations§
Auto Trait Implementations§
impl !Sized for Avail
impl Freeze for Avail
impl RefUnwindSafe for Avail
impl Send for Avail
impl Sync for Avail
impl Unpin for Avail
impl UnsafeUnpin for Avail
impl UnwindSafe for Avail
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