[−][src]Struct generic_vec::raw::Heap
Heap
Implementations
impl<T> Heap<T>[src]
pub const fn new() -> Self[src]
Create a new zero-capacity heap vector
pub const unsafe fn from_raw_parts(ptr: NonNull<T>, capacity: usize) -> Self[src]
Create a new Heap<T>storage from the given pointer and capacity
Safety
If the capacity is non-zero
- You must have allocated the pointer from the global allocator
- The pointer must be valid to read-write for the range
ptr..ptr.add(capacity)
pub const fn into_raw_parts(self) -> (NonNull<T>, usize)[src]
Convert a Heap storage into a pointer and capacity, without
deallocating the storage
Trait Implementations
impl<T> Default for Heap<T>[src]
impl<T> Drop for Heap<T>[src]
impl<T> Send for Heap<T>[src]
impl<T, U> Storage<U> for Heap<T>[src]
pub fn is_valid_storage() -> bool[src]
pub fn capacity(&self) -> usize[src]
pub fn as_ptr(&self) -> *const U[src]
pub fn as_mut_ptr(&mut self) -> *mut U[src]
pub fn reserve(&mut self, new_capacity: usize)[src]
pub fn try_reserve(&mut self, new_capacity: usize) -> Result<(), AllocError>[src]
impl<T, U> StorageWithCapacity<U> for Heap<T>[src]
pub fn with_capacity(capacity: usize) -> Self[src]
impl<T> Sync for Heap<T>[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Heap<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Unpin for Heap<T>
impl<T> UnwindSafe for Heap<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,