pub struct Storage<T, I: TypedId> { /* private fields */ }
Expand description
A table of T
values indexed by the id type I
.
The table is represented as a vector indexed by the ids’ index
values, so you should use an id allocator like IdentityManager
that keeps the index values dense and close to zero.
Trait Implementations§
Auto Trait Implementations§
impl<T, I> RefUnwindSafe for Storage<T, I>where I: RefUnwindSafe, T: RefUnwindSafe,
impl<T, I> Send for Storage<T, I>where I: Send, T: Send,
impl<T, I> Sync for Storage<T, I>where I: Sync, T: Sync,
impl<T, I> Unpin for Storage<T, I>where I: Unpin, T: Unpin,
impl<T, I> UnwindSafe for Storage<T, I>where I: UnwindSafe, T: UnwindSafe,
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