[−][src]Trait swim_mem::resident::ResidentWithCapacity
A type that can initialize a new memory Lease
with a preallocated capacity,
and an empty Resident
.
Required methods
fn new_resident_layout(cap: usize, meta: &M) -> Result<Layout, LayoutError>
Returns the memory layout for an empty resident with the given
pre-allocated capacity and meta
data.
fn new_resident_ptr(raw: *mut u8, cap: usize, meta: &M) -> *mut Self::Data
Converts a raw
pointer into a Data
pointer for an empty resident
with the given preallocated capacity and meta
data.
fn new_resident(lease: &mut L, cap: usize, meta: M)
Initializes the lease
with an empty resident from the given
pre-allocated capacity and meta
data.