[][src]Trait swim_mem::resident::ResidentFromValue

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

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

Required methods

fn new_resident_layout(data: &T, meta: &M) -> Layout

Returns the memory layout for a resident with the given data and meta data.

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

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

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

Initializes the lease with a resident from the given data and meta data.

Loading content...

Implementors

impl<L: Lease<Data = T, Meta = M>, T, M> ResidentFromValue<L, T, M> for Box<T, M>[src]

Loading content...