pub struct ArenaSeed<T> {
pub slots: Vec<(u32, Option<T>)>,
pub free: Vec<u32>,
}Expand description
Per-slot (generation, value) plus the free list. Empty slots keep
their generation: reuse bumps it, and a replay that skipped them would
hand out different ids for later inserts.
Fields§
§slots: Vec<(u32, Option<T>)>§free: Vec<u32>Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for ArenaSeed<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ArenaSeed<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> Freeze for ArenaSeed<T>
impl<T> RefUnwindSafe for ArenaSeed<T>
impl<T> Send for ArenaSeed<T>
impl<T> Sync for ArenaSeed<T>
impl<T> Unpin for ArenaSeed<T>
impl<T> UnsafeUnpin for ArenaSeed<T>
impl<T> UnwindSafe for ArenaSeed<T>
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