Struct scoped_allocator::Place
[−]
[src]
pub struct Place<'a, T: 'a, A: 'a + Allocator> { /* fields omitted */ }
A place for allocating into. This is only used for in-place allocation, e.g. let val = in (alloc.allocate().unwrap())
Trait Implementations
impl<'a, T: 'a, A: 'a + Allocator> Placer<T> for Place<'a, T, A>
[src]
type Place = Self
🔬 This is a nightly-only experimental API. (
placement_new_protocol
)Place
is the intermedate agent guarding the uninitialized state for Data
. Read more
fn make_place(self) -> Self
🔬 This is a nightly-only experimental API. (
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>
🔬 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
🔬 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
impl<'a, T: 'a, A: 'a + Allocator> StdPlace<T> for Place<'a, T, A>
[src]
fn pointer(&mut self) -> *mut T
🔬 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