[][src]Trait swim_mem::resident::ResidentFromCopy

pub trait ResidentFromCopy<L: Lease, T: ?Sized, 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 copy of a value.

Required methods

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

Returns the memory layout for a resident with a copy of 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 a copy of the given data and meta data.

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

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

Loading content...

Implementors

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

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

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

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

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentFromCopy<L, str, M> for Buf<u8, M>[src]

Loading content...