Struct syscall::io::Dma

source ·
pub struct Dma<T: ?Sized> { /* private fields */ }

Implementations§

source§

impl<T> Dma<T>

source

pub fn from_physbox_uninit(phys: PhysBox) -> Result<Dma<MaybeUninit<T>>>

source

pub fn from_physbox_zeroed(phys: PhysBox) -> Result<Dma<MaybeUninit<T>>>

source

pub fn from_physbox(phys: PhysBox, value: T) -> Result<Self>

source

pub fn new(value: T) -> Result<Self>

source

pub fn zeroed() -> Result<Dma<MaybeUninit<T>>>

source§

impl<T> Dma<MaybeUninit<T>>

source

pub unsafe fn assume_init(self) -> Dma<T>

source§

impl<T: ?Sized> Dma<T>

source

pub fn physical(&self) -> usize

source

pub fn size(&self) -> usize

source

pub fn phys(&self) -> &PhysBox

source§

impl<T> Dma<[T]>

source

pub fn from_physbox_uninit_unsized( phys: PhysBox, len: usize ) -> Result<Dma<[MaybeUninit<T>]>>

source

pub fn from_physbox_zeroed_unsized( phys: PhysBox, len: usize ) -> Result<Dma<[MaybeUninit<T>]>>

source

pub unsafe fn zeroed_unsized(count: usize) -> Result<Self>

Creates a new DMA buffer with a size only known at runtime.

Safety
  • T must be properly aligned.
  • T must be valid as zeroed (i.e. no NonNull pointers).
source§

impl<T> Dma<[MaybeUninit<T>]>

source

pub unsafe fn assume_init(self) -> Dma<[T]>

Trait Implementations§

source§

impl<T: ?Sized> Deref for Dma<T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.
source§

impl<T: ?Sized> DerefMut for Dma<T>

source§

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

Mutably dereferences the value.
source§

impl<T: ?Sized> Drop for Dma<T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<T: ?Sized> RefUnwindSafe for Dma<T>where T: RefUnwindSafe,

§

impl<T> !Send for Dma<T>

§

impl<T> !Sync for Dma<T>

§

impl<T: ?Sized> Unpin for Dma<T>

§

impl<T: ?Sized> UnwindSafe for Dma<T>where T: RefUnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere U: Into<T>,

§

type Error = Infallible

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

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

Performs the conversion.
source§

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 · source§

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

Performs the conversion.