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.

Trait Implementations

impl<'a, T: ?Sized, A: ?Sized + Allocator> Deref for AllocBox<'a, T, A>

type Target = T

fn deref(&self) -> &T

impl<'a, T: ?Sized, A: ?Sized + Allocator> DerefMut for AllocBox<'a, T, A>

fn deref_mut(&mut self) -> &mut T

impl<'a, T: ?Sized + Unsize<U>, U: ?Sized, A: ?Sized + Allocator> CoerceUnsized<AllocBox<'a, U, A>> for AllocBox<'a, T, A>

impl<'a, T: ?Sized, A: ?Sized + Allocator> Borrow<T> for AllocBox<'a, T, A>

fn borrow(&self) -> &T

impl<'a, T: ?Sized, A: ?Sized + Allocator> BorrowMut<T> for AllocBox<'a, T, A>

fn borrow_mut(&mut self) -> &mut T

impl<'a, T: ?Sized, A: ?Sized + Allocator> Drop for AllocBox<'a, T, A>

fn drop(&mut self)