[][src]Trait swim_mem::resident::ResidentFromEmpty

pub trait ResidentFromEmpty<L: Lease, M = ()>: Resident {
    fn new_resident_layout(meta: &M) -> Layout;
fn new_resident_ptr(raw: *mut u8, meta: &M) -> *mut Self::Data;
fn new_resident(lease: &mut L, meta: M); }

A type that can initialize a new memory Lease with an empty Resident.

Required methods

fn new_resident_layout(meta: &M) -> Layout

Returns the memory layout for an empty resident with the given meta data.

fn new_resident_ptr(raw: *mut u8, meta: &M) -> *mut Self::Data

Converts a raw pointer into a Data pointer for an empty resident with the given meta data.

fn new_resident(lease: &mut L, meta: M)

Initializes the lease with an empty resident from the given meta data.

Loading content...

Implementors

impl<L: Lease<Data = T, Meta = BufHeader<M>>, T, M> ResidentFromEmpty<L, M> for Buf<T, M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentFromEmpty<L, M> for String<M>[src]

Loading content...