[][src]Trait sunrise_libuser::ipc::SizedIPCBuffer

pub trait SizedIPCBuffer {
    fn size(&self) -> usize;
fn is_cool(addr: usize, size: usize) -> bool;
unsafe fn from_raw_parts<'a>(addr: usize, size: usize) -> &'a Self;
unsafe fn from_raw_parts_mut<'a>(addr: usize, size: usize) -> &'a mut Self; }

Util used for IPC buffer sizing.

Required methods

fn size(&self) -> usize

Return the size of the type.

fn is_cool(addr: usize, size: usize) -> bool

Check if the address and size are correct.

unsafe fn from_raw_parts<'a>(addr: usize, size: usize) -> &'a Self

Create a reference to a ipc buffer from an address and a byte size.

Safety

See slice::from_raw_parts

unsafe fn from_raw_parts_mut<'a>(addr: usize, size: usize) -> &'a mut Self

Create a mutable reference to a ipc buffer from an address and a byte size.

Safety

See slice::from_raw_parts_mut

Loading content...

Implementations on Foreign Types

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

Loading content...

Implementors

impl<T> SizedIPCBuffer for T[src]

Loading content...