Struct containers::collections::RawVec[][src]

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

Raw growable array, a low-level utility type to allocate a buffer of memory and not need to worry about edge cases

It never inspects the memory it holds; it merely allocates enough memory to hold however many elements, and deallocates on drop but not drops its contents.

Methods

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

Make a new array.

Make a new array with enough room to hold at least cap elements.

Failures

Returns None if allocation fails.

Return number of elements array can hold before reallocation.

Make sure the array has enough room for at least n_more more elements, assuming it already holds n, reallocating if need be.

Failures

Returns false if allocation fails, true otherwise.

Relinquish memory so capacity = n.

impl<'a, T> RawVec<T, FixedStorage<'a, T>>
[src]

impl<'a, T: 'a> RawVec<T, FixedStorage<'a, T>>
[src]

empty: Self = RawVec{ptr: <Unique>::empty(), cap: 0, alloc: FixedStorage(PhantomData),}

impl<T, A: Alloc + Default> RawVec<T, A>
[src]

Make a new array.

Trait Implementations

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

Executes the destructor for this type. Read more

impl<T, A: Alloc + Default> Default for RawVec<T, A>
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

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

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