[−][src]Struct malloc_array::store::Store
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]
fn from_iter<I: IntoIterator<Item = *mut T>>(iter: I) -> Self[src]
impl<T> IntoIterator for Store<T>[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Store<T> where
T: RefUnwindSafe,
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,
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,
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<I> IntoIterator for I where
I: Iterator, [src]
I: Iterator,
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?
fn into_iter(self) -> I[src]
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.
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>,