[][src]Struct malloc_array::store::Store

pub struct Store<T> { /* fields omitted */ }

Statically typed pointer store. free()s and drops on drop.

Implementations

impl<T> Store<T>[src]

pub fn new() -> Self[src]

Create a new pointer store.

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

Add a pointer to the store.

pub fn remove(&mut self, ptr: *mut T)[src]

Remove a pointer from the store.

pub fn into_raw_parts(self) -> Vec<*mut T>[src]

Consumes the instance and returns the pointers without freeing them.

pub fn from_raw_parts(pointers: Vec<*mut T>) -> Self[src]

Consume a vector of pointers and return a new Store<T>.

pub fn free(self)[src]

Free all the pointers in the store without calling their destructors (if the have any).

pub fn into_heap_array(self) -> HeapArray<T>[src]

Move all data from all pointers into a new HeapArray<T> instance and free the old pointers.

Trait Implementations

impl<T: Debug> Debug for Store<T>[src]

impl<T> Drop for Store<T>[src]

impl<T> FromIterator<*mut T> for Store<T>[src]

impl<T> IntoIterator for Store<T>[src]

type Item = *mut T

The type of the elements being iterated over.

type IntoIter = IntoIter<Self::Item>

Which kind of iterator are we turning this into?

Auto Trait Implementations

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

impl<T> !Send for Store<T>

impl<T> !Sync for Store<T>

impl<T> Unpin for Store<T>

impl<T> UnwindSafe for Store<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<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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.