Struct light_arena::AllocatorPlacer
[−]
[src]
pub struct AllocatorPlacer<'a, T: 'a + Sized + Copy> { /* fields omitted */ }
Object representing a place to put a newly requested allocation.
Drop
is never called so the placement new can only be run on
Sized + Copy
types. The lifetime of the place, and the subsequently
placed T
is tied to the lifetime of the Allocator
which created
the AllocatorPlacer
.
Trait Implementations
impl<'a, T: 'a + Sized + Copy> Place<T> for AllocatorPlacer<'a, T>
[src]
fn pointer(&mut self) -> *mut T
[src]
🔬 This is a nightly-only experimental API. (
placement_new_protocol
)Returns the address where the input value will be written. Note that the data at this address is generally uninitialized, and thus one should use ptr::write
for initializing it. Read more
impl<'a, T: 'a + Sized + Copy> InPlace<T> for AllocatorPlacer<'a, T>
[src]
type Owner = &'a mut T
🔬 This is a nightly-only experimental API. (
placement_new_protocol
)Owner
is the type of the end value of PLACE <- EXPR
Read more
unsafe fn finalize(self) -> Self::Owner
[src]
🔬 This is a nightly-only experimental API. (
placement_new_protocol
)Converts self into the final value, shifting deallocation/cleanup responsibilities (if any remain), over to the returned instance of Owner
and forgetting self. Read more