pub struct Used {
pub flags: UsedF,
pub idx: le16,
/* private fields */
}Expand description
The Virtqueue Used Ring
Fields§
§flags: UsedF§idx: le16Implementations§
Source§impl Used
impl Used
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 Used
impl Used
pub fn layout(queue_size: u16, has_event_idx: bool) -> Layout
pub fn from_ptr( ptr: NonNull<[u8]>, has_event_idx: bool, ) -> Option<NonNull<Self>>
pub fn ring_ptr(this: NonNull<Self>) -> NonNull<[UsedElem]>
pub fn ring(&self) -> &[UsedElem]
pub fn ring_mut(&mut self) -> &mut [UsedElem]
pub fn avail_event_ptr(this: NonNull<Self>) -> Option<NonNull<le16>>
pub fn avail_event(&self) -> Option<&le16>
pub fn avail_event_mut(&mut self) -> Option<&mut le16>
Trait Implementations§
Auto Trait Implementations§
impl !Sized for Used
impl Freeze for Used
impl RefUnwindSafe for Used
impl Send for Used
impl Sync for Used
impl Unpin for Used
impl UnsafeUnpin for Used
impl UnwindSafe for Used
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