[][src]Struct kernel::AppSlice

pub struct AppSlice<L, T> {
    ptr: AppPtr<L, T>,
    len: usize,
}

Buffer of memory shared from an app to the kernel.

This is the type created after an app calls the allow syscall.

Fields

ptr: AppPtr<L, T>len: usize

Methods

impl<L, T> AppSlice<L, T>[src]

pub(crate) fn new(ptr: *mut T, len: usize, appid: AppId) -> AppSlice<L, T>[src]

pub fn len(&self) -> usize[src]

Number of bytes in the AppSlice.

pub fn ptr(&self) -> *const T[src]

Get the raw pointer to the buffer. This will be a pointer inside of the app's memory region.

pub(crate) unsafe fn expose_to(&self, appid: AppId) -> bool[src]

Provide access to one app's AppSlice to another app. This is used for IPC.

pub fn iter(&self) -> Iter<T>[src]

pub fn iter_mut(&mut self) -> IterMut<T>[src]

pub fn chunks(&self, size: usize) -> Chunks<T>[src]

pub fn chunks_mut(&mut self, size: usize) -> ChunksMut<T>[src]

Trait Implementations

impl<L, T> AsRef<[T]> for AppSlice<L, T>[src]

impl<L, T> AsMut<[T]> for AppSlice<L, T>[src]

Auto Trait Implementations

impl<L, T> Unpin for AppSlice<L, T> where
    L: Unpin,
    T: Unpin

impl<L, T> !Send for AppSlice<L, T>

impl<L, T> !Sync for AppSlice<L, T>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]