[][src]Struct generic_vec::raw::Heap

#[repr(C)]pub struct Heap<T> { /* fields omitted */ }

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]

impl<T, U> StorageWithCapacity<U> for Heap<T>[src]

impl<T> Sync for Heap<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Heap<T> where
    T: RefUnwindSafe

impl<T> Unpin for Heap<T>

impl<T> UnwindSafe for Heap<T> where
    T: RefUnwindSafe

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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> 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.