pub struct Store<T> { /* private fields */ }
Expand description
Statically typed pointer store. free()
s and drops on drop.
Implementations§
Source§impl<T> Store<T>
impl<T> Store<T>
Sourcepub fn into_raw_parts(self) -> Vec<*mut T>
pub fn into_raw_parts(self) -> Vec<*mut T>
Consumes the instance and returns the pointers without freeing them.
Sourcepub fn from_raw_parts(pointers: Vec<*mut T>) -> Self
pub fn from_raw_parts(pointers: Vec<*mut T>) -> Self
Consume a vector of pointers and return a new Store<T>
.
Sourcepub fn free(self)
pub fn free(self)
Free all the pointers in the store without calling their destructors (if the have any).
Sourcepub fn into_heap_array(self) -> HeapArray<T>
pub fn into_heap_array(self) -> HeapArray<T>
Move all data from all pointers into a new HeapArray<T>
instance and free the old pointers.
Trait Implementations§
Source§impl<T> FromIterator<*mut T> for Store<T>
impl<T> FromIterator<*mut T> for Store<T>
Source§impl<T> IntoIterator for Store<T>
impl<T> IntoIterator for Store<T>
Auto Trait Implementations§
impl<T> Freeze for Store<T>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more