pub struct DescTable { /* private fields */ }Expand description
A table of descriptors stored in shared memory.
Implementations§
Source§impl DescTable
impl DescTable
pub const DEFAULT_LEN: usize = 256
Sourcepub unsafe fn from_raw_parts(base_addr: u64, len: usize) -> Self
pub unsafe fn from_raw_parts(base_addr: u64, len: usize) -> Self
Create a descriptor table from shared memory.
§Safety
base_addrmust be valid for reads and writes oflendescriptorsbase_addrmust be properly aligned forDescriptorlenmust not exceedu16::MAX- memory must remain valid for the lifetime of this table
Sourcepub fn desc_addr(&self, idx: u16) -> Option<u64>
pub fn desc_addr(&self, idx: u16) -> Option<u64>
Get view into descriptor at index or None if idx is out of bounds
pub const fn default_len() -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DescTable
impl RefUnwindSafe for DescTable
impl Send for DescTable
impl Sync for DescTable
impl Unpin for DescTable
impl UnsafeUnpin for DescTable
impl UnwindSafe for DescTable
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