[−][src]Struct realbox::RealBox
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]
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]
Trait Implementations
Auto Trait Implementations
impl<T, A> Unpin for RealBox<T, A> where
A: Unpin,
T: Unpin,
A: Unpin,
T: Unpin,
impl<T, A> Send for RealBox<T, A> where
A: Send,
T: Send,
A: Send,
T: Send,
impl<T, A> Sync for RealBox<T, A> where
A: Sync,
T: Sync,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,