Struct collections::boxed::IntermediateBox [] [src]

pub struct IntermediateBox<T> where T: ?Sized {
    // some fields omitted
}
Unstable

: placement box design is still being worked out.

IntermediateBox represents uninitialized backing storage for Box`Box`.

FIXME (pnkfelix): Ideally we would just reuse Box<T>`Boxinstead of introducing a separateIntermediateBox; but then you hit issues when you e.g. attempt to destructure an instance ofBox`, since it is a lang item and so it gets special handling by the compiler. Easier just to make this parallel type for now.

FIXME (pnkfelix): Currently the box`boxprotocol only supports creating instances of sized types. This IntermediateBox is designed to be forward-compatible with a future protocol that supports creating instances of unsized types; that is why the type parameter has the?Sizedgeneralization marker, and is also why this carries an explicit size. However, it probably does not need to carry the explicit alignment; that is just a work-around for the fact that thealign_of` intrinsic currently requires the input type to be Sized (which I do not think is strictly necessary).

Trait Implementations

impl<T> Place<T> for IntermediateBox<T>

fn pointer(&mut self) -> *mut T

impl<T> BoxPlace<T> for IntermediateBox<T>

fn make_place() -> IntermediateBox<T>

impl<T> InPlace<T> for IntermediateBox<T>

type Owner = Box<T>

unsafe fn finalize(self) -> Box<T>

impl<T> Drop for IntermediateBox<T> where T: ?Sized

fn drop(&mut self)