#[repr(C)]
pub struct VirtQueue<T>where T: Deref<Target = [VirtQueueEntry]>,{ /* private fields */ }
Expand description

A container for holding virtqueue.

Implementations§

source§

impl VirtQueue<Box<[VirtQueueEntry]>>

source

pub fn new(size: usize) -> Self

Create a new virtqueue.

source

pub fn virt_queue_ptr(&self) -> usize

Get a virtual address of the virtqueue.

source§

impl VirtQueue<&'static [VirtQueueEntry]>

source

pub unsafe fn new_from_raw_ptr(size: usize, queue_va: Va) -> Self

Get a virtqueue from Va.

source§

impl<T> VirtQueue<T>where T: Deref<Target = [VirtQueueEntry]>,

source

pub fn fetcher<'a>( &'a mut self, mmio: &'a mut VirtIoMmioHeader ) -> VirtQueueFetcher<'_, T>

Get a fetcher object of the virtqueue.

Trait Implementations§

source§

impl<T> Index<usize> for VirtQueue<T>where T: Deref<Target = [VirtQueueEntry]>,

§

type Output = VirtQueueEntry

The returned type after indexing.
source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T> IndexMut<usize> for VirtQueue<T>where T: Deref<Target = [VirtQueueEntry]> + DerefMut,

source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for VirtQueue<T>where T: RefUnwindSafe,

§

impl<T> Send for VirtQueue<T>where T: Send,

§

impl<T> Sync for VirtQueue<T>where T: Sync,

§

impl<T> Unpin for VirtQueue<T>where T: Unpin,

§

impl<T> UnwindSafe for VirtQueue<T>where T: UnwindSafe,

Blanket Implementations§

§

impl<T> Any for Twhere T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

const: unstable§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.