Struct allocators::AllocBox
[−]
[src]
pub struct AllocBox<'a, T: 'a + ?Sized, A: 'a + ?Sized + Allocator> {
// some fields omitted
}An item allocated by a custom allocator.
Methods
impl<'a, T: ?Sized, A: ?Sized + Allocator> AllocBox<'a, T, A>
fn take(self) -> T where T: Sized
Consumes this allocated value, yielding the value it manages.
unsafe fn as_block(&self) -> Block
Gets a handle to the block of memory this manages.
impl<'a, A: ?Sized + Allocator> AllocBox<'a, Any, A>
fn downcast<T: Any>(self) -> Result<AllocBox<'a, T, A>, AllocBox<'a, Any, A>>
Attempts to downcast this AllocBox to a concrete type.