Struct allocators::Place
[−]
[src]
pub struct Place<'a, T: 'a, A: 'a + Allocator> { // some fields omitted }
A place for allocating into.
This is only used for in-place allocation,
e.g. let val = in (alloc.make_place().unwrap())
Trait Implementations
impl<'a, T: 'a, A: 'a + Allocator> Placer<T> for Place<'a, T, A>
[src]
type Place = Self
Unstable (
placement_new_protocol
)Place
is the intermedate agent guarding the uninitialized state for Data
. Read more
fn make_place(self) -> Self
Unstable (
placement_new_protocol
)Creates a fresh place from self
.
impl<'a, T: 'a, A: 'a + Allocator> InPlace<T> for Place<'a, T, A>
[src]
type Owner = Allocated<'a, T, A>
Unstable (
placement_new_protocol
)Owner
is the type of the end value of in (PLACE) EXPR
Read more
unsafe fn finalize(self) -> Self::Owner
Unstable (
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
impl<'a, T: 'a, A: 'a + Allocator> StdPlace<T> for Place<'a, T, A>
[src]
fn pointer(&mut self) -> *mut T
Unstable (
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