pub struct GenMapOf<K, V, Gen = u32, S = HashMap<K, V>>where
K: Clone,
Gen: IGeneration,{ /* private fields */ }Expand description
A Generational Map Collection.
GenID stay stable, even after inserting the same key twice.
Implementations§
Source§impl<K, V, Gen, S> GenMapOf<K, V, Gen, S>where
K: Clone,
Gen: IGeneration,
impl<K, V, Gen, S> GenMapOf<K, V, Gen, S>where
K: Clone,
Gen: IGeneration,
pub fn new() -> GenMapOf<K, V, Gen, S>where
S: Default,
pub fn len(&self) -> usize
pub fn get<Idx>(&self, index: Idx) -> Option<&V>
pub fn get_mut<Idx>(&mut self, index: Idx) -> Option<&mut V>
pub fn try_get<Idx>( &self, index: Idx, ) -> Result<&V, <GenMapOf<K, V, Gen, S> as TryGet<Idx>>::Error>
pub fn try_get_mut<Idx>( &mut self, index: Idx, ) -> Result<&mut V, <GenMapOf<K, V, Gen, S> as TryGet<Idx>>::Error>
pub fn insert(&mut self, key: K, value: V) -> (GenIDOf<V, Gen>, Option<V>)
pub fn insert_cyclic<'s, F>( &'s mut self, key: K, init: F, ) -> (GenIDOf<V, Gen>, Option<V>)
pub fn remove<Idx>(&mut self, index: Idx) -> Option<V>
pub fn iter(&self) -> Iter<'_, K, V, Gen> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, K, V, Gen> ⓘ
pub fn ids(&self) -> impl Iterator<Item = GenIDOf<V, Gen>>
pub fn values(&self) -> impl Iterator<Item = &V>
pub fn values_mut(&mut self) -> impl Iterator<Item = &mut V>
Trait Implementations§
Source§impl<K, V, Gen, S> AsRef<GenSeq<Entry<K, V>, Gen>> for GenMapOf<K, V, Gen, S>where
K: Clone,
Gen: IGeneration,
impl<K, V, Gen, S> AsRef<GenSeq<Entry<K, V>, Gen>> for GenMapOf<K, V, Gen, S>where
K: Clone,
Gen: IGeneration,
Source§impl<'de, K, V, Gen, St> Deserialize<'de> for GenMapOf<K, V, Gen, St>where
K: Clone + Deserialize<'de>,
Gen: IGeneration + Deserialize<'de>,
V: Deserialize<'de>,
St: Default + Insert<K, GenIDOf<V, Gen>>,
GenSeq<Entry<K, V>, Gen>: Deserialize<'de>,
Available on crate feature serde only.
impl<'de, K, V, Gen, St> Deserialize<'de> for GenMapOf<K, V, Gen, St>where
K: Clone + Deserialize<'de>,
Gen: IGeneration + Deserialize<'de>,
V: Deserialize<'de>,
St: Default + Insert<K, GenIDOf<V, Gen>>,
GenSeq<Entry<K, V>, Gen>: Deserialize<'de>,
Available on crate feature
serde only.Source§fn deserialize<D>(
deserializer: D,
) -> Result<GenMapOf<K, V, Gen, St>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<GenMapOf<K, V, Gen, St>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<K, V, Gen, S> Extend<(K, V)> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> Extend<(K, V)> for GenMapOf<K, V, Gen, S>
Source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = (K, V)>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = (K, V)>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<K, V, Gen, S> FromIterator<(K, V)> for GenMapOf<K, V, Gen, S>where
K: Clone,
Gen: IGeneration,
S: Default + Insert<K, GenIDOf<V, Gen>>,
GenMapOf<K, V, Gen, S>: WithCapacity + Reserve,
<GenMapOf<K, V, Gen, S> as WithCapacity>::Param: Default,
impl<K, V, Gen, S> FromIterator<(K, V)> for GenMapOf<K, V, Gen, S>where
K: Clone,
Gen: IGeneration,
S: Default + Insert<K, GenIDOf<V, Gen>>,
GenMapOf<K, V, Gen, S>: WithCapacity + Reserve,
<GenMapOf<K, V, Gen, S> as WithCapacity>::Param: Default,
Source§impl<'a, Q, K, V, Gen, S> Get<&'a Q> for GenMapOf<K, V, Gen, S>
impl<'a, Q, K, V, Gen, S> Get<&'a Q> for GenMapOf<K, V, Gen, S>
type Output = V
Source§fn get(
&self,
index: &'a Q,
) -> Option<&<GenMapOf<K, V, Gen, S> as Get<&'a Q>>::Output>
fn get( &self, index: &'a Q, ) -> Option<&<GenMapOf<K, V, Gen, S> as Get<&'a Q>>::Output>
Returns a reference to the value.
Source§fn get_or_panic(&self, index: Idx) -> &Self::Output
fn get_or_panic(&self, index: Idx) -> &Self::Output
Returns a reference to the value.
Source§unsafe fn get_unchecked(&self, index: Idx) -> &Self::Output
unsafe fn get_unchecked(&self, index: Idx) -> &Self::Output
Returns a reference to the value.
Source§fn is_index_valid(&self, index: Idx) -> bool
fn is_index_valid(&self, index: Idx) -> bool
True if
get(index) return Some, false otherwise.Source§fn is_index_invalid(&self, index: Idx) -> bool
fn is_index_invalid(&self, index: Idx) -> bool
True if
get(index) return None, false otherwise.fn contains(&self, index: Idx) -> bool
Source§impl<K, V, Gen, S> Get<GenIDOf<V, Gen>> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> Get<GenIDOf<V, Gen>> for GenMapOf<K, V, Gen, S>
type Output = V
Source§fn get(
&self,
index: GenIDOf<V, Gen>,
) -> Option<&<GenMapOf<K, V, Gen, S> as Get<GenIDOf<V, Gen>>>::Output>
fn get( &self, index: GenIDOf<V, Gen>, ) -> Option<&<GenMapOf<K, V, Gen, S> as Get<GenIDOf<V, Gen>>>::Output>
Returns a reference to the value.
Source§unsafe fn get_unchecked(
&self,
index: GenIDOf<V, Gen>,
) -> &<GenMapOf<K, V, Gen, S> as Get<GenIDOf<V, Gen>>>::Output
unsafe fn get_unchecked( &self, index: GenIDOf<V, Gen>, ) -> &<GenMapOf<K, V, Gen, S> as Get<GenIDOf<V, Gen>>>::Output
Returns a reference to the value.
Source§fn get_or_panic(&self, index: Idx) -> &Self::Output
fn get_or_panic(&self, index: Idx) -> &Self::Output
Returns a reference to the value.
Source§fn is_index_valid(&self, index: Idx) -> bool
fn is_index_valid(&self, index: Idx) -> bool
True if
get(index) return Some, false otherwise.Source§fn is_index_invalid(&self, index: Idx) -> bool
fn is_index_invalid(&self, index: Idx) -> bool
True if
get(index) return None, false otherwise.fn contains(&self, index: Idx) -> bool
Source§impl<K, V, Gen, S> Get<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> Get<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
type Output = V
Source§fn get(
&self,
index: UntypedGenIDOf<Gen>,
) -> Option<&<GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output>
fn get( &self, index: UntypedGenIDOf<Gen>, ) -> Option<&<GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output>
Returns a reference to the value.
Source§unsafe fn get_unchecked(
&self,
index: UntypedGenIDOf<Gen>,
) -> &<GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output
unsafe fn get_unchecked( &self, index: UntypedGenIDOf<Gen>, ) -> &<GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output
Returns a reference to the value.
Source§fn get_or_panic(&self, index: Idx) -> &Self::Output
fn get_or_panic(&self, index: Idx) -> &Self::Output
Returns a reference to the value.
Source§fn is_index_valid(&self, index: Idx) -> bool
fn is_index_valid(&self, index: Idx) -> bool
True if
get(index) return Some, false otherwise.Source§fn is_index_invalid(&self, index: Idx) -> bool
fn is_index_invalid(&self, index: Idx) -> bool
True if
get(index) return None, false otherwise.fn contains(&self, index: Idx) -> bool
Source§impl<K, V, Gen, S> GetManyMut<GenIDOf<V, Gen>> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> GetManyMut<GenIDOf<V, Gen>> for GenMapOf<K, V, Gen, S>
fn try_get_many_mut<const N: usize>( &mut self, indices: [GenIDOf<V, Gen>; N], ) -> Result<[&mut <GenMapOf<K, V, Gen, S> as Get<GenIDOf<V, Gen>>>::Output; N], GetDisjointMutError>
Source§unsafe fn get_many_unchecked_mut<const N: usize>(
&mut self,
indices: [GenIDOf<V, Gen>; N],
) -> [&mut <GenMapOf<K, V, Gen, S> as Get<GenIDOf<V, Gen>>>::Output; N]
unsafe fn get_many_unchecked_mut<const N: usize>( &mut self, indices: [GenIDOf<V, Gen>; N], ) -> [&mut <GenMapOf<K, V, Gen, S> as Get<GenIDOf<V, Gen>>>::Output; N]
Returns multiples mutables references to the values.
All values that can be accessed with the indices must be disjoint.
Source§fn get_many_mut<const N: usize>(
&mut self,
indices: [Idx; N],
) -> Option<[&mut Self::Output; N]>
fn get_many_mut<const N: usize>( &mut self, indices: [Idx; N], ) -> Option<[&mut Self::Output; N]>
Returns multiples mutables references to the values.
All values that can be accessed with the indices must be disjoint.
Source§fn get_many_mut_or_panic<const N: usize>(
&mut self,
indices: [Idx; N],
) -> [&mut Self::Output; N]
fn get_many_mut_or_panic<const N: usize>( &mut self, indices: [Idx; N], ) -> [&mut Self::Output; N]
Returns multiples mutables references to the values.
All values that can be accessed with the indices must be disjoint.
Source§fn swap(&mut self, a: Idx, b: Idx) -> bool
fn swap(&mut self, a: Idx, b: Idx) -> bool
Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§fn swap_or_panic(&mut self, a: Idx, b: Idx)
fn swap_or_panic(&mut self, a: Idx, b: Idx)
Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§impl<K, V, Gen, S> GetManyMut<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> GetManyMut<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
fn try_get_many_mut<const N: usize>( &mut self, indices: [UntypedGenIDOf<Gen>; N], ) -> Result<[&mut <GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output; N], GetDisjointMutError>
Source§unsafe fn get_many_unchecked_mut<const N: usize>(
&mut self,
indices: [UntypedGenIDOf<Gen>; N],
) -> [&mut <GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output; N]
unsafe fn get_many_unchecked_mut<const N: usize>( &mut self, indices: [UntypedGenIDOf<Gen>; N], ) -> [&mut <GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output; N]
Returns multiples mutables references to the values.
All values that can be accessed with the indices must be disjoint.
Source§fn get_many_mut<const N: usize>(
&mut self,
indices: [Idx; N],
) -> Option<[&mut Self::Output; N]>
fn get_many_mut<const N: usize>( &mut self, indices: [Idx; N], ) -> Option<[&mut Self::Output; N]>
Returns multiples mutables references to the values.
All values that can be accessed with the indices must be disjoint.
Source§fn get_many_mut_or_panic<const N: usize>(
&mut self,
indices: [Idx; N],
) -> [&mut Self::Output; N]
fn get_many_mut_or_panic<const N: usize>( &mut self, indices: [Idx; N], ) -> [&mut Self::Output; N]
Returns multiples mutables references to the values.
All values that can be accessed with the indices must be disjoint.
Source§fn swap(&mut self, a: Idx, b: Idx) -> bool
fn swap(&mut self, a: Idx, b: Idx) -> bool
Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§fn swap_or_panic(&mut self, a: Idx, b: Idx)
fn swap_or_panic(&mut self, a: Idx, b: Idx)
Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§impl<'a, Q, K, V, Gen, S> GetMut<&'a Q> for GenMapOf<K, V, Gen, S>
impl<'a, Q, K, V, Gen, S> GetMut<&'a Q> for GenMapOf<K, V, Gen, S>
Source§fn get_mut(
&mut self,
index: &'a Q,
) -> Option<&mut <GenMapOf<K, V, Gen, S> as Get<&'a Q>>::Output>
fn get_mut( &mut self, index: &'a Q, ) -> Option<&mut <GenMapOf<K, V, Gen, S> as Get<&'a Q>>::Output>
Returns a mutable reference to the value.
fn get_mut_or_panic(&mut self, index: Idx) -> &mut Self::Output
Source§unsafe fn get_unchecked_mut(&mut self, index: Idx) -> &mut Self::Output
unsafe fn get_unchecked_mut(&mut self, index: Idx) -> &mut Self::Output
Returns a mutable reference to the value.
Source§fn replace(&mut self, index: Idx, value: Self::Output) -> Option<Self::Output>
fn replace(&mut self, index: Idx, value: Self::Output) -> Option<Self::Output>
Replace the value and return the old one. Read more
Source§fn replace_or_panic(&mut self, index: Idx, value: Self::Output) -> Self::Output
fn replace_or_panic(&mut self, index: Idx, value: Self::Output) -> Self::Output
Replace the value and return the old one. Read more
Source§unsafe fn replace_unchecked(
&mut self,
index: Idx,
value: Self::Output,
) -> Self::Output
unsafe fn replace_unchecked( &mut self, index: Idx, value: Self::Output, ) -> Self::Output
Replace the value and return the old one. Read more
Source§fn set(&mut self, index: Idx, value: Self::Output) -> bool
fn set(&mut self, index: Idx, value: Self::Output) -> bool
Set the value and drop the previous one.
Source§fn set_or_panic(&mut self, index: Idx, value: Self::Output) -> &mut Self
fn set_or_panic(&mut self, index: Idx, value: Self::Output) -> &mut Self
Set the value and drop the previous one.
unsafe fn set_unchecked(&mut self, index: Idx, value: Self::Output) -> &mut Self
Source§impl<K, V, Gen, S> GetMut<GenIDOf<V, Gen>> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> GetMut<GenIDOf<V, Gen>> for GenMapOf<K, V, Gen, S>
Source§fn get_mut(
&mut self,
index: GenIDOf<V, Gen>,
) -> Option<&mut <GenMapOf<K, V, Gen, S> as Get<GenIDOf<V, Gen>>>::Output>
fn get_mut( &mut self, index: GenIDOf<V, Gen>, ) -> Option<&mut <GenMapOf<K, V, Gen, S> as Get<GenIDOf<V, Gen>>>::Output>
Returns a mutable reference to the value.
Source§unsafe fn get_unchecked_mut(
&mut self,
index: GenIDOf<V, Gen>,
) -> &mut <GenMapOf<K, V, Gen, S> as Get<GenIDOf<V, Gen>>>::Output
unsafe fn get_unchecked_mut( &mut self, index: GenIDOf<V, Gen>, ) -> &mut <GenMapOf<K, V, Gen, S> as Get<GenIDOf<V, Gen>>>::Output
Returns a mutable reference to the value.
fn get_mut_or_panic(&mut self, index: Idx) -> &mut Self::Output
Source§fn replace(&mut self, index: Idx, value: Self::Output) -> Option<Self::Output>
fn replace(&mut self, index: Idx, value: Self::Output) -> Option<Self::Output>
Replace the value and return the old one. Read more
Source§fn replace_or_panic(&mut self, index: Idx, value: Self::Output) -> Self::Output
fn replace_or_panic(&mut self, index: Idx, value: Self::Output) -> Self::Output
Replace the value and return the old one. Read more
Source§unsafe fn replace_unchecked(
&mut self,
index: Idx,
value: Self::Output,
) -> Self::Output
unsafe fn replace_unchecked( &mut self, index: Idx, value: Self::Output, ) -> Self::Output
Replace the value and return the old one. Read more
Source§fn set(&mut self, index: Idx, value: Self::Output) -> bool
fn set(&mut self, index: Idx, value: Self::Output) -> bool
Set the value and drop the previous one.
Source§fn set_or_panic(&mut self, index: Idx, value: Self::Output) -> &mut Self
fn set_or_panic(&mut self, index: Idx, value: Self::Output) -> &mut Self
Set the value and drop the previous one.
unsafe fn set_unchecked(&mut self, index: Idx, value: Self::Output) -> &mut Self
Source§impl<K, V, Gen, S> GetMut<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> GetMut<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
Source§fn get_mut(
&mut self,
index: UntypedGenIDOf<Gen>,
) -> Option<&mut <GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output>
fn get_mut( &mut self, index: UntypedGenIDOf<Gen>, ) -> Option<&mut <GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output>
Returns a mutable reference to the value.
Source§unsafe fn get_unchecked_mut(
&mut self,
index: UntypedGenIDOf<Gen>,
) -> &mut <GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output
unsafe fn get_unchecked_mut( &mut self, index: UntypedGenIDOf<Gen>, ) -> &mut <GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output
Returns a mutable reference to the value.
fn get_mut_or_panic(&mut self, index: Idx) -> &mut Self::Output
Source§fn replace(&mut self, index: Idx, value: Self::Output) -> Option<Self::Output>
fn replace(&mut self, index: Idx, value: Self::Output) -> Option<Self::Output>
Replace the value and return the old one. Read more
Source§fn replace_or_panic(&mut self, index: Idx, value: Self::Output) -> Self::Output
fn replace_or_panic(&mut self, index: Idx, value: Self::Output) -> Self::Output
Replace the value and return the old one. Read more
Source§unsafe fn replace_unchecked(
&mut self,
index: Idx,
value: Self::Output,
) -> Self::Output
unsafe fn replace_unchecked( &mut self, index: Idx, value: Self::Output, ) -> Self::Output
Replace the value and return the old one. Read more
Source§fn set(&mut self, index: Idx, value: Self::Output) -> bool
fn set(&mut self, index: Idx, value: Self::Output) -> bool
Set the value and drop the previous one.
Source§fn set_or_panic(&mut self, index: Idx, value: Self::Output) -> &mut Self
fn set_or_panic(&mut self, index: Idx, value: Self::Output) -> &mut Self
Set the value and drop the previous one.
unsafe fn set_unchecked(&mut self, index: Idx, value: Self::Output) -> &mut Self
Source§impl<K, V, Gen, S> Index<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> Index<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
Source§impl<K, V, Gen, S> IndexMut<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> IndexMut<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
Source§fn index_mut(
&mut self,
index: UntypedGenIDOf<Gen>,
) -> &mut <GenMapOf<K, V, Gen, S> as Index<UntypedGenIDOf<Gen>>>::Output
fn index_mut( &mut self, index: UntypedGenIDOf<Gen>, ) -> &mut <GenMapOf<K, V, Gen, S> as Index<UntypedGenIDOf<Gen>>>::Output
Performs the mutable indexing (
container[index]) operation. Read moreSource§impl<'a, K, V, Gen, S> IntoIterator for &'a GenMapOf<K, V, Gen, S>where
K: Clone,
Gen: IGeneration,
impl<'a, K, V, Gen, S> IntoIterator for &'a GenMapOf<K, V, Gen, S>where
K: Clone,
Gen: IGeneration,
Source§impl<'a, K, V, Gen, S> IntoIterator for &'a mut GenMapOf<K, V, Gen, S>where
K: Clone,
Gen: IGeneration,
impl<'a, K, V, Gen, S> IntoIterator for &'a mut GenMapOf<K, V, Gen, S>where
K: Clone,
Gen: IGeneration,
Source§impl<K, V, Gen, S> IntoIterator for GenMapOf<K, V, Gen, S>where
K: Clone,
Gen: IGeneration,
impl<K, V, Gen, S> IntoIterator for GenMapOf<K, V, Gen, S>where
K: Clone,
Gen: IGeneration,
Source§impl<K, V, Gen, S> Remove<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> Remove<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
Source§impl<K, V, Gen, S> Reserve for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> Reserve for GenMapOf<K, V, Gen, S>
fn reserve(&mut self, additional: usize)
fn reserve_exact(&mut self, additional: usize)
fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
fn try_reserve_exact( &mut self, additional: usize, ) -> Result<(), TryReserveError>
Source§fn reserve_total(&mut self, total: usize)where
Self: Length,
fn reserve_total(&mut self, total: usize)where
Self: Length,
Ensure total capacity is at least
total.
Does nothing if the current capacity is already >= total.Source§fn try_reserve_total(&mut self, total: usize) -> Result<(), TryReserveError>where
Self: Length,
fn try_reserve_total(&mut self, total: usize) -> Result<(), TryReserveError>where
Self: Length,
Ensure total capacity is at least
total.
Does nothing if the current capacity is already >= total.Source§fn reserve_total_exact(&mut self, total: usize)where
Self: Length,
fn reserve_total_exact(&mut self, total: usize)where
Self: Length,
Ensure total capacity is at least
total.
Does nothing if the current capacity is already >= total.Source§fn try_reserve_total_exact(
&mut self,
total: usize,
) -> Result<(), TryReserveError>where
Self: Length,
fn try_reserve_total_exact(
&mut self,
total: usize,
) -> Result<(), TryReserveError>where
Self: Length,
Ensure total capacity is at least
total.
Does nothing if the current capacity is already >= total.Source§impl<K, V, Gen, St> Serialize for GenMapOf<K, V, Gen, St>
Available on crate feature serde only.
impl<K, V, Gen, St> Serialize for GenMapOf<K, V, Gen, St>
Available on crate feature
serde only.Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl<K, V, Gen, S> Shrink for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> Shrink for GenMapOf<K, V, Gen, S>
Source§fn shrink_to_fit(&mut self)
fn shrink_to_fit(&mut self)
Shrinks the capacity as much as possible.
Source§impl<K, V, Gen, S> TryGet<GenIDOf<V, Gen>> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> TryGet<GenIDOf<V, Gen>> for GenMapOf<K, V, Gen, S>
Source§impl<K, V, Gen, S> TryGet<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> TryGet<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
type Error = <GenSeq<Entry<K, V>, Gen> as TryGet<UntypedGenIDOf<Gen>>>::Error
Source§fn try_get(
&self,
index: UntypedGenIDOf<Gen>,
) -> Result<&<GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output, <GenMapOf<K, V, Gen, S> as TryGet<UntypedGenIDOf<Gen>>>::Error>
fn try_get( &self, index: UntypedGenIDOf<Gen>, ) -> Result<&<GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output, <GenMapOf<K, V, Gen, S> as TryGet<UntypedGenIDOf<Gen>>>::Error>
Returns a reference to the value.
Source§impl<'a, Q, K, V, Gen, S> TryGetMut<&'a Q> for GenMapOf<K, V, Gen, S>
impl<'a, Q, K, V, Gen, S> TryGetMut<&'a Q> for GenMapOf<K, V, Gen, S>
Source§fn try_get_mut(
&mut self,
index: &'a Q,
) -> Result<&mut <GenMapOf<K, V, Gen, S> as Get<&'a Q>>::Output, <GenMapOf<K, V, Gen, S> as TryGet<&'a Q>>::Error>
fn try_get_mut( &mut self, index: &'a Q, ) -> Result<&mut <GenMapOf<K, V, Gen, S> as Get<&'a Q>>::Output, <GenMapOf<K, V, Gen, S> as TryGet<&'a Q>>::Error>
Returns a mutable reference to the value.
Source§impl<K, V, Gen, S> TryGetMut<GenIDOf<V, Gen>> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> TryGetMut<GenIDOf<V, Gen>> for GenMapOf<K, V, Gen, S>
Source§fn try_get_mut(
&mut self,
index: GenIDOf<V, Gen>,
) -> Result<&mut <GenMapOf<K, V, Gen, S> as Get<GenIDOf<V, Gen>>>::Output, <GenMapOf<K, V, Gen, S> as TryGet<GenIDOf<V, Gen>>>::Error>
fn try_get_mut( &mut self, index: GenIDOf<V, Gen>, ) -> Result<&mut <GenMapOf<K, V, Gen, S> as Get<GenIDOf<V, Gen>>>::Output, <GenMapOf<K, V, Gen, S> as TryGet<GenIDOf<V, Gen>>>::Error>
Returns a mutable reference to the value.
Source§impl<K, V, Gen, S> TryGetMut<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> TryGetMut<UntypedGenIDOf<Gen>> for GenMapOf<K, V, Gen, S>
Source§fn try_get_mut(
&mut self,
index: UntypedGenIDOf<Gen>,
) -> Result<&mut <GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output, <GenMapOf<K, V, Gen, S> as TryGet<UntypedGenIDOf<Gen>>>::Error>
fn try_get_mut( &mut self, index: UntypedGenIDOf<Gen>, ) -> Result<&mut <GenMapOf<K, V, Gen, S> as Get<UntypedGenIDOf<Gen>>>::Output, <GenMapOf<K, V, Gen, S> as TryGet<UntypedGenIDOf<Gen>>>::Error>
Returns a mutable reference to the value.
Source§impl<K, V, Gen, S> WithCapacity for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> WithCapacity for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> Collection for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> CollectionBijective for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> Eq for GenMapOf<K, V, Gen, S>
Auto Trait Implementations§
impl<K, V, Gen, S> Freeze for GenMapOf<K, V, Gen, S>where
S: Freeze,
impl<K, V, Gen, S> RefUnwindSafe for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> Send for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> Sync for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> Unpin for GenMapOf<K, V, Gen, S>
impl<K, V, Gen, S> UnsafeUnpin for GenMapOf<K, V, Gen, S>where
S: UnsafeUnpin,
impl<K, V, Gen, S> UnwindSafe for GenMapOf<K, V, Gen, S>
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
Source§impl<S, T> CastRangeInto<T> for Swhere
T: CastRangeFrom<S>,
impl<S, T> CastRangeInto<T> for Swhere
T: CastRangeFrom<S>,
fn cast_range_into(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<I, T> CollectTo<T> for Iwhere
I: IntoIterator<Item = T>,
impl<I, T> CollectTo<T> for Iwhere
I: IntoIterator<Item = T>,
fn to_vec(self) -> Vec<T>
fn to_linkedlist(self) -> LinkedList<T>
fn to_vecdeque(self) -> VecDeque<T>
fn to_hashset(self) -> HashSet<T>
fn to_btreeset(self) -> BTreeSet<T>where
T: Ord,
Source§impl<I, K, S> CollectToGenSet<K, S> for Iwhere
I: IntoIterator<Item = K>,
K: Clone,
impl<I, K, S> CollectToGenSet<K, S> for Iwhere
I: IntoIterator<Item = K>,
K: Clone,
Source§impl<I, T> CollectToGenVec<T> for Iwhere
I: IntoIterator<Item = T>,
impl<I, T> CollectToGenVec<T> for Iwhere
I: IntoIterator<Item = T>,
Source§impl<T> DefaultExtension for T
impl<T> DefaultExtension for T
fn is_default(&self) -> bool
fn is_not_default(&self) -> bool
Source§impl<T> DefaultIsTripleUnderscore for Twhere
T: Default,
impl<T> DefaultIsTripleUnderscore for Twhere
T: Default,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
fn from_json_bytes(bytes: &[u8]) -> Result<Self, EncodeError>
fn from_json_with_reader<R>(reader: R) -> Result<Self, EncodeError>where
R: Read,
fn from_json(json: &str) -> Result<Self, EncodeError>
Source§impl<T> FromRon for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromRon for Twhere
T: for<'de> Deserialize<'de>,
fn from_ron_bytes(bytes: &[u8]) -> Result<Self, EncodeError>
fn from_ron_with_reader<R>(reader: R) -> Result<Self, EncodeError>where
R: Read,
fn from_ron(ron: &str) -> Result<Self, EncodeError>
Source§impl<T> FromTmpBin for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromTmpBin for Twhere
T: for<'de> Deserialize<'de>,
fn from_tmp_bin_bytes(bytes: &[u8]) -> Result<Self, EncodeError>
fn from_tmp_bin_with_reader<R>(reader: R) -> Result<Self, EncodeError>where
R: Read,
Source§impl<T> FromXml for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromXml for Twhere
T: for<'de> Deserialize<'de>,
fn from_xml_bytes(bytes: &[u8]) -> Result<Self, EncodeError>
fn from_xml_with_reader<R>(reader: R) -> Result<Self, EncodeError>where
R: Read,
fn from_xml(xml: &str) -> Result<Self, EncodeError>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<'a, Item, T> IterExtension<'a, Item> for Twhere
&'a T: IntoIterator<Item = Item> + 'a,
impl<'a, Item, T> IterExtension<'a, Item> for Twhere
&'a T: IntoIterator<Item = Item> + 'a,
fn iter(&'a self) -> <&'a Self as IntoIterator>::IntoIter
Source§impl<Item, T> IterPredicate<Item> for Twhere
T: IntoIterator<Item = Item>,
impl<Item, T> IterPredicate<Item> for Twhere
T: IntoIterator<Item = Item>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToJson for Twhere
T: Serialize,
impl<T> ToJson for Twhere
T: Serialize,
fn to_json(&self) -> Result<String, EncodeError>
fn to_json_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>where
W: Write,
Source§impl<T> ToRon for Twhere
T: Serialize,
impl<T> ToRon for Twhere
T: Serialize,
fn to_ron(&self) -> Result<String, EncodeError>
fn to_ron_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>where
W: Write,
Source§impl<T> ToTmpBin for Twhere
T: Serialize,
impl<T> ToTmpBin for Twhere
T: Serialize,
Source§fn to_tmp_bin(&self) -> Result<Vec<u8>, EncodeError>
fn to_tmp_bin(&self) -> Result<Vec<u8>, EncodeError>
Intended for short-term storage of data in a binary format, such as during data transfer. Read more
Source§fn to_tmp_bin_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>where
W: Write,
fn to_tmp_bin_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>where
W: Write,
Intended for short-term storage of data in a binary format, such as during data transfer. Read more