Enum sel4_async_block_io::Operation

source ·
pub enum Operation<'a, A: Access> {
    Read {
        buf: &'a mut [u8],
        witness: A::ReadWitness,
    },
    Write {
        buf: &'a [u8],
        witness: A::WriteWitness,
    },
}

Variants§

§

Read

Fields

§buf: &'a mut [u8]
§witness: A::ReadWitness
§

Write

Fields

§buf: &'a [u8]
§witness: A::WriteWitness

Implementations§

source§

impl<'a, A: Access> Operation<'a, A>

source

pub fn with_read_access<A1: ReadAccess + Access<WriteWitness = A::WriteWitness>>( &'a mut self, ) -> Operation<'a, A1>

source

pub fn with_write_access<A1: WriteAccess + Access<ReadWitness = A::ReadWitness>>( &'a mut self, ) -> Operation<'a, A1>

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn ty(&self) -> OperationType

source

pub fn index(&'a mut self, index: Range<usize>) -> Self

source

pub fn split_at(&'a mut self, mid: usize) -> (Self, Self)

source

pub fn chunks( &'a mut self, chunk_size: usize, ) -> impl Iterator<Item = Operation<'a, A>>

source§

impl<'a> Operation<'a, ReadOnly>

source

pub fn as_read(&'a mut self) -> &'a mut [u8]

source§

impl<'a> Operation<'a, WriteOnly>

source

pub fn as_write(&'a self) -> &'a [u8]

source§

impl<'a, A: ReadAccess> Operation<'a, A>

source

pub fn read(buf: &'a mut [u8]) -> Self

source§

impl<'a, A: WriteAccess> Operation<'a, A>

source

pub fn write(buf: &'a [u8]) -> Self

Auto Trait Implementations§

§

impl<'a, A> Freeze for Operation<'a, A>
where <A as Access>::ReadWitness: Freeze, <A as Access>::WriteWitness: Freeze,

§

impl<'a, A> RefUnwindSafe for Operation<'a, A>
where <A as Access>::ReadWitness: RefUnwindSafe, <A as Access>::WriteWitness: RefUnwindSafe,

§

impl<'a, A> Send for Operation<'a, A>
where <A as Access>::ReadWitness: Send, <A as Access>::WriteWitness: Send,

§

impl<'a, A> Sync for Operation<'a, A>
where <A as Access>::ReadWitness: Sync, <A as Access>::WriteWitness: Sync,

§

impl<'a, A> Unpin for Operation<'a, A>

§

impl<'a, A> !UnwindSafe for Operation<'a, A>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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 T
where U: Into<T>,

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.