Skip to main content

RingAddresses

Struct RingAddresses 

Source
pub struct RingAddresses {
    pub descriptors: u64,
    pub available: u64,
    pub used: u64,
}
Expand description

Where a driver put a queue’s three parts, as device addresses: what it writes to the transport’s descriptor, driver and device area registers.

Fields§

§descriptors: u64

The descriptor table.

§available: u64

The available ring, which the driver writes.

§used: u64

The used ring, which the device writes.

Implementations§

Source§

impl RingAddresses

Source

pub const fn descriptor_table_bytes(size: QueueSize) -> u64

Bytes of descriptor table a queue of size has.

Source

pub const fn available_ring_bytes(size: QueueSize) -> u64

Bytes of available ring a queue of size has. The trailing used_event word exists only with event indices, which this profile does not negotiate.

Source

pub const fn used_ring_bytes(size: QueueSize) -> u64

Bytes of used ring a queue of size has.

Source

pub const fn contiguous(base: u64, size: QueueSize) -> Option<(Self, u64)>

The three parts one after another from base, each aligned as §2.7 requires, and the bytes the whole takes. None when base is not aligned for a descriptor table or the queue would wrap the address space.

Trait Implementations§

Source§

impl Clone for RingAddresses

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RingAddresses

Source§

impl Debug for RingAddresses

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for RingAddresses

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for RingAddresses

Source§

impl PartialEq for RingAddresses

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RingAddresses

Auto Trait Implementations§

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
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.