[][src]Struct realbox::RealBox

pub struct RealBox<T, A: Alloc = Global> { /* fields omitted */ }

Methods

impl<T, A: Alloc> RealBox<T, A>[src]

pub fn ptr(&self) -> *mut T[src]

Gets a raw pointer to the start of the allocation. Note that this is Unique::empty() if cap = 0 or T is zero-sized. In the former case, you must be careful.

pub fn alloc(&self) -> &A[src]

Returns a shared reference to the allocator backing this RawVec.

pub fn alloc_mut(&mut self) -> &mut A[src]

Returns a mutable reference to the allocator backing this RawVec.

impl<T, A: Alloc> RealBox<T, A>[src]

pub unsafe fn dealloc_buffer(&mut self)[src]

impl<T> RealBox<T, Global>[src]

pub fn new() -> Self[src]

pub unsafe fn into_box(self) -> Box<T>[src]

Converts the entire buffer into Box<T>.

impl<T> RealBox<T, Global>[src]

pub fn heap_init<F>(initialize: F) -> Box<T> where
    F: Fn(&mut T), 
[src]

impl<T, A: Alloc> RealBox<T, A>[src]

pub fn new_with_allocator(a: A) -> Self[src]

impl<T, A: Alloc> RealBox<T, A>[src]

pub unsafe fn from_raw_parts(ptr: *mut T, a: A) -> Self[src]

impl<T> RealBox<T, Global>[src]

pub fn from_box(slice: Box<[T]>) -> Self[src]

Trait Implementations

impl<T, A: Alloc> Drop for RealBox<T, A>[src]

Auto Trait Implementations

impl<T, A> Unpin for RealBox<T, A> where
    A: Unpin,
    T: Unpin

impl<T, A> Send for RealBox<T, A> where
    A: Send,
    T: Send

impl<T, A> Sync for RealBox<T, A> where
    A: Sync,
    T: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]