[][src]Struct malloc_array::store::DynStore

pub struct DynStore { /* fields omitted */ }

Dynamically typed pointer store. Frees on drop.

Implementations

impl DynStore[src]

pub fn new() -> Self[src]

Create a new pointer store.

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

Add a pointer to the store.

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

Remove a pointer from the store.

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

Consumes the instance and returns the pointers without freeing them.

pub fn from_raw_parts(pointers: Vec<*mut ()>) -> 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).

Trait Implementations

impl Debug for DynStore[src]

impl Drop for DynStore[src]

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

impl IntoIterator for DynStore[src]

type Item = *mut ()

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 RefUnwindSafe for DynStore

impl !Send for DynStore

impl !Sync for DynStore

impl Unpin for DynStore

impl UnwindSafe for DynStore

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.