pub struct GenSeq<T, Gen = u32, C = Vec<Entry<T, Gen>>>{ /* private fields */ }Implementations§
Source§impl<T, Gen, C> GenSeq<T, Gen, C>
impl<T, Gen, C> GenSeq<T, Gen, C>
pub fn as_ref<'a>(&'a self) -> GenSeq<T, Gen, &'a [Entry<T, Gen>]>
pub fn get_entry_from_index(&self, index: usize) -> Option<&Entry<T, Gen>>
pub fn get_from_index(&self, index: usize) -> Option<&T>
pub fn get_entry(&self, id: GenIDOf<T, Gen>) -> Option<&Entry<T, Gen>>
pub fn get(&self, id: GenIDOf<T, Gen>) -> Option<&T>
Sourcepub fn index_to_id(&self, index: usize) -> GenIDOf<T, Gen>
pub fn index_to_id(&self, index: usize) -> GenIDOf<T, Gen>
Return a valid GenID to the current index or return GenIDOf::NULL if the index is outside the range
pub fn entries( &self, ) -> impl Iterator<Item = &Entry<T, Gen>> + DoubleEndedIterator + FusedIterator
pub const fn len(&self) -> usize
pub fn iter(&self) -> Iter<'_, T, Gen> ⓘ
pub fn ids(&self) -> impl Iterator<Item = GenIDOf<T, Gen>>
pub fn values(&self) -> impl Iterator<Item = &T>
pub fn into_ids(self) -> impl Iterator<Item = GenIDOf<T, Gen>>where
C: IntoIterator<Item = Entry<T, Gen>>,
pub fn into_values(self) -> impl Iterator<Item = T>where
C: IntoIterator<Item = Entry<T, Gen>>,
Sourcepub fn iter_index(&self) -> impl Iterator<Item = usize> + 'static
pub fn iter_index(&self) -> impl Iterator<Item = usize> + 'static
Iter over all entry index, including the free/unused one.
The correct way to iterate over all entry index.
Use this instead of 0..genvec.len() (wrong).
pub fn to_owned(&self) -> GenSeq<T, Gen, <C as ToOwned>::Owned>
Source§impl<T, Gen, C> GenSeq<T, Gen, C>
impl<T, Gen, C> GenSeq<T, Gen, C>
pub fn as_mut<'a>(&'a mut self) -> GenSeq<T, Gen, &'a mut [Entry<T, Gen>]>
Sourcepub fn remove_all(&mut self)
pub fn remove_all(&mut self)
pub fn rollback_insert(&mut self, id: GenIDOf<T, Gen>) -> Result<T, ()>
pub fn try_insert_cyclic<F>( &mut self, init: F, ) -> Result<GenIDOf<T, Gen>, <C as TryPush<Entry<T, Gen>>>::Error>
pub fn try_insert( &mut self, value: T, ) -> Result<GenIDOf<T, Gen>, <C as TryPush<Entry<T, Gen>>>::Error>
pub fn insert_cyclic<F>(&mut self, init: F) -> GenIDOf<T, Gen>
pub fn insert(&mut self, value: T) -> GenIDOf<T, Gen>
pub fn get_mut_from_index(&mut self, index: usize) -> Option<&mut T>
pub fn get_mut(&mut self, id: GenIDOf<T, Gen>) -> Option<&mut T>
Sourcepub fn rollback_remove_index(
&mut self,
index: usize,
value: T,
) -> Result<(), ()>
pub fn rollback_remove_index( &mut self, index: usize, value: T, ) -> Result<(), ()>
The operation that once done just after an Self::remove_from_index, put this data structure in the same state as before
pub fn remove_from_index(&mut self, index: usize) -> Option<T>
pub fn rollback_remove( &mut self, id: GenIDOf<T, Gen>, value: T, ) -> Result<(), ()>
pub fn remove(&mut self, id: GenIDOf<T, Gen>) -> Option<T>
pub fn iter_mut(&mut self) -> IterMut<'_, T, Gen> ⓘ
pub fn values_mut(&mut self) -> impl Iterator<Item = &mut T>
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<K, Gen, S> AsRef<GenSeq<K, Gen>> for GenSetOf<K, Gen, S>where
K: Clone,
Gen: IGeneration,
impl<K, Gen, S> AsRef<GenSeq<K, Gen>> for GenSetOf<K, Gen, S>where
K: Clone,
Gen: IGeneration,
Source§impl<'de, T, C, Gen> Deserialize<'de> for GenSeq<T, Gen, C>where
C: AsRef<[Entry<T, Gen>]> + Deserialize<'de>,
Gen: IGeneration + Deserialize<'de>,
T: Deserialize<'de>,
Available on crate feature serde only.
impl<'de, T, C, Gen> Deserialize<'de> for GenSeq<T, Gen, C>where
C: AsRef<[Entry<T, Gen>]> + Deserialize<'de>,
Gen: IGeneration + Deserialize<'de>,
T: Deserialize<'de>,
Available on crate feature
serde only.Source§fn deserialize<D>(
deserializer: D,
) -> Result<GenSeq<T, Gen, C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<GenSeq<T, Gen, C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T, Gen, C> Extend<(GenIDOf<T, Gen>, T)> for GenSeq<T, Gen, C>where
C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]> + Push<Entry<T, Gen>>,
Gen: IGeneration,
T: GenIDUpdatable<T, Gen>,
impl<T, Gen, C> Extend<(GenIDOf<T, Gen>, T)> for GenSeq<T, Gen, C>where
C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]> + Push<Entry<T, Gen>>,
Gen: IGeneration,
T: GenIDUpdatable<T, Gen>,
Source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = (GenIDOf<T, Gen>, T)>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = (GenIDOf<T, Gen>, T)>,
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<T, Gen, C> Extend<T> for GenSeq<T, Gen, C>
impl<T, Gen, C> Extend<T> for GenSeq<T, Gen, C>
Source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
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<'s, T, Gen, C> From<&'s mut GenSeq<T, Gen, C>> for GenSeq<T, Gen, &'s mut [Entry<T, Gen>]>
impl<'s, T, Gen, C> From<&'s mut GenSeq<T, Gen, C>> for GenSeq<T, Gen, &'s mut [Entry<T, Gen>]>
Source§impl<T, C, Gen> FromIterator<T> for GenSeq<T, Gen, C>
impl<T, C, Gen> FromIterator<T> for GenSeq<T, Gen, C>
Source§impl<T, Gen, C> Get<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
impl<T, Gen, C> Get<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
type Output = <GenSeq<T, Gen, C> as Index<GenIDOf<T, Gen>>>::Output
Source§fn get(
&self,
index: GenIDOf<T, Gen>,
) -> Option<&<GenSeq<T, Gen, C> as Get<GenIDOf<T, Gen>>>::Output>
fn get( &self, index: GenIDOf<T, Gen>, ) -> Option<&<GenSeq<T, Gen, C> as Get<GenIDOf<T, 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§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<T, Gen, C> Get<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
impl<T, Gen, C> Get<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
type Output = <GenSeq<T, Gen, C> as Index<GenIDOf<T, Gen>>>::Output
Source§fn get(
&self,
index: UntypedGenIDOf<Gen>,
) -> Option<&<GenSeq<T, Gen, C> as Get<UntypedGenIDOf<Gen>>>::Output>
fn get( &self, index: UntypedGenIDOf<Gen>, ) -> Option<&<GenSeq<T, Gen, C> 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§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<T, Gen, C> Get<usize> for GenSeq<T, Gen, C>
impl<T, Gen, C> Get<usize> for GenSeq<T, Gen, C>
type Output = <GenSeq<T, Gen, C> as Index<usize>>::Output
Source§fn get(
&self,
index: usize,
) -> Option<&<GenSeq<T, Gen, C> as Get<usize>>::Output>
fn get( &self, index: usize, ) -> Option<&<GenSeq<T, Gen, C> as Get<usize>>::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<T, Gen, C> GetManyMut<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
impl<T, Gen, C> GetManyMut<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
fn try_get_many_mut<const N: usize>( &mut self, indices: [GenIDOf<T, Gen>; N], ) -> Result<[&mut <GenSeq<T, Gen, C> as Get<GenIDOf<T, Gen>>>::Output; N], GetDisjointMutError>
Source§fn get_many_mut<const N: usize>(
&mut self,
indices: [GenIDOf<T, Gen>; N],
) -> Option<[&mut <GenSeq<T, Gen, C> as Get<GenIDOf<T, Gen>>>::Output; N]>
fn get_many_mut<const N: usize>( &mut self, indices: [GenIDOf<T, Gen>; N], ) -> Option<[&mut <GenSeq<T, Gen, C> as Get<GenIDOf<T, 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_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§unsafe fn get_many_unchecked_mut<const N: usize>(
&mut self,
indices: [Idx; N],
) -> [&mut Self::Output; N]
unsafe fn get_many_unchecked_mut<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<T, Gen, C> GetManyMut<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
impl<T, Gen, C> GetManyMut<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
fn try_get_many_mut<const N: usize>( &mut self, indices: [UntypedGenIDOf<Gen>; N], ) -> Result<[&mut <GenSeq<T, Gen, C> as Get<UntypedGenIDOf<Gen>>>::Output; N], GetDisjointMutError>
Source§fn get_many_mut<const N: usize>(
&mut self,
indices: [UntypedGenIDOf<Gen>; N],
) -> Option<[&mut <GenSeq<T, Gen, C> as Get<UntypedGenIDOf<Gen>>>::Output; N]>
fn get_many_mut<const N: usize>( &mut self, indices: [UntypedGenIDOf<Gen>; N], ) -> Option<[&mut <GenSeq<T, Gen, C> 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_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§unsafe fn get_many_unchecked_mut<const N: usize>(
&mut self,
indices: [Idx; N],
) -> [&mut Self::Output; N]
unsafe fn get_many_unchecked_mut<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<T, Gen, C> GetManyMut<usize> for GenSeq<T, Gen, C>
impl<T, Gen, C> GetManyMut<usize> for GenSeq<T, Gen, C>
fn try_get_many_mut<const N: usize>( &mut self, indices: [usize; N], ) -> Result<[&mut <GenSeq<T, Gen, C> as Get<usize>>::Output; N], GetDisjointMutError>
Source§fn get_many_mut<const N: usize>(
&mut self,
indices: [usize; N],
) -> Option<[&mut <GenSeq<T, Gen, C> as Get<usize>>::Output; N]>
fn get_many_mut<const N: usize>( &mut self, indices: [usize; N], ) -> Option<[&mut <GenSeq<T, Gen, C> as Get<usize>>::Output; N]>
Returns multiples mutables references to the values.
All values that can be accessed with the indices must be disjoint.
Source§unsafe fn get_many_unchecked_mut<const N: usize>(
&mut self,
indices: [usize; N],
) -> [&mut <GenSeq<T, Gen, C> as Get<usize>>::Output; N]
unsafe fn get_many_unchecked_mut<const N: usize>( &mut self, indices: [usize; N], ) -> [&mut <GenSeq<T, Gen, C> as Get<usize>>::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<T, Gen, C> GetMut<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
impl<T, Gen, C> GetMut<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
Source§fn get_mut(
&mut self,
index: GenIDOf<T, Gen>,
) -> Option<&mut <GenSeq<T, Gen, C> as Get<GenIDOf<T, Gen>>>::Output>
fn get_mut( &mut self, index: GenIDOf<T, Gen>, ) -> Option<&mut <GenSeq<T, Gen, C> as Get<GenIDOf<T, Gen>>>::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<T, Gen, C> GetMut<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
impl<T, Gen, C> GetMut<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
Source§fn get_mut(
&mut self,
index: UntypedGenIDOf<Gen>,
) -> Option<&mut <GenSeq<T, Gen, C> as Get<UntypedGenIDOf<Gen>>>::Output>
fn get_mut( &mut self, index: UntypedGenIDOf<Gen>, ) -> Option<&mut <GenSeq<T, Gen, C> 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§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<T, Gen, C> GetMut<usize> for GenSeq<T, Gen, C>
impl<T, Gen, C> GetMut<usize> for GenSeq<T, Gen, C>
Source§fn get_mut(
&mut self,
index: usize,
) -> Option<&mut <GenSeq<T, Gen, C> as Get<usize>>::Output>
fn get_mut( &mut self, index: usize, ) -> Option<&mut <GenSeq<T, Gen, C> as Get<usize>>::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<T, C, Gen> Index<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
impl<T, C, Gen> Index<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
Source§impl<T, C, Gen> IndexMut<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
impl<T, C, Gen> IndexMut<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
Source§fn index_mut(
&mut self,
index: UntypedGenIDOf<Gen>,
) -> &mut <GenSeq<T, Gen, C> as Index<UntypedGenIDOf<Gen>>>::Output
fn index_mut( &mut self, index: UntypedGenIDOf<Gen>, ) -> &mut <GenSeq<T, Gen, C> as Index<UntypedGenIDOf<Gen>>>::Output
Performs the mutable indexing (
container[index]) operation. Read moreSource§impl<'s, T, C, Gen> IntoIterator for &'s GenSeq<T, Gen, C>
impl<'s, T, C, Gen> IntoIterator for &'s GenSeq<T, Gen, C>
Source§impl<'s, T, C, Gen> IntoIterator for &'s mut GenSeq<T, Gen, C>
impl<'s, T, C, Gen> IntoIterator for &'s mut GenSeq<T, Gen, C>
Source§impl<T, C, Gen> IntoIterator for GenSeq<T, Gen, C>where
C: AsRef<[Entry<T, Gen>]> + IntoIterator,
<C as IntoIterator>::Item: GenVecEntryIntoValue<Gen>,
Gen: IGeneration,
impl<T, C, Gen> IntoIterator for GenSeq<T, Gen, C>where
C: AsRef<[Entry<T, Gen>]> + IntoIterator,
<C as IntoIterator>::Item: GenVecEntryIntoValue<Gen>,
Gen: IGeneration,
Source§type Item = (GenIDOf<T, Gen>, <<C as IntoIterator>::Item as GenVecEntryIntoValue<Gen>>::EntryItem)
type Item = (GenIDOf<T, Gen>, <<C as IntoIterator>::Item as GenVecEntryIntoValue<Gen>>::EntryItem)
The type of the elements being iterated over.
Source§impl<T, Gen, C> Remove<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
impl<T, Gen, C> Remove<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
Source§impl<T, Gen, C> Reserve for GenSeq<T, Gen, C>
impl<T, Gen, C> Reserve for GenSeq<T, Gen, C>
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<T, C, Gen> Serialize for GenSeq<T, Gen, C>
Available on crate feature serde only.
impl<T, C, Gen> Serialize for GenSeq<T, Gen, C>
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<T, Gen, C> Shrink for GenSeq<T, Gen, C>
impl<T, Gen, C> Shrink for GenSeq<T, Gen, C>
Source§fn shrink_to_fit(&mut self)
fn shrink_to_fit(&mut self)
Shrinks the capacity as much as possible.
Source§impl<T, Gen, C> TryGet<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
impl<T, Gen, C> TryGet<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
type Error = GenVecError<T, Gen>
Source§fn try_get(
&self,
id: UntypedGenIDOf<Gen>,
) -> Result<&<GenSeq<T, Gen, C> as Get<UntypedGenIDOf<Gen>>>::Output, <GenSeq<T, Gen, C> as TryGet<UntypedGenIDOf<Gen>>>::Error>
fn try_get( &self, id: UntypedGenIDOf<Gen>, ) -> Result<&<GenSeq<T, Gen, C> as Get<UntypedGenIDOf<Gen>>>::Output, <GenSeq<T, Gen, C> as TryGet<UntypedGenIDOf<Gen>>>::Error>
Returns a reference to the value.
Source§impl<T, Gen, C> TryGetMut<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
impl<T, Gen, C> TryGetMut<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
Source§fn try_get_mut(
&mut self,
id: GenIDOf<T, Gen>,
) -> Result<&mut <GenSeq<T, Gen, C> as Get<GenIDOf<T, Gen>>>::Output, <GenSeq<T, Gen, C> as TryGet<GenIDOf<T, Gen>>>::Error>
fn try_get_mut( &mut self, id: GenIDOf<T, Gen>, ) -> Result<&mut <GenSeq<T, Gen, C> as Get<GenIDOf<T, Gen>>>::Output, <GenSeq<T, Gen, C> as TryGet<GenIDOf<T, Gen>>>::Error>
Returns a mutable reference to the value.
Source§impl<T, Gen, C> TryGetMut<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
impl<T, Gen, C> TryGetMut<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
Source§fn try_get_mut(
&mut self,
id: UntypedGenIDOf<Gen>,
) -> Result<&mut <GenSeq<T, Gen, C> as Get<UntypedGenIDOf<Gen>>>::Output, <GenSeq<T, Gen, C> as TryGet<UntypedGenIDOf<Gen>>>::Error>
fn try_get_mut( &mut self, id: UntypedGenIDOf<Gen>, ) -> Result<&mut <GenSeq<T, Gen, C> as Get<UntypedGenIDOf<Gen>>>::Output, <GenSeq<T, Gen, C> as TryGet<UntypedGenIDOf<Gen>>>::Error>
Returns a mutable reference to the value.
Source§impl<T, Gen, C> TryGetMut<usize> for GenSeq<T, Gen, C>
impl<T, Gen, C> TryGetMut<usize> for GenSeq<T, Gen, C>
Source§fn try_get_mut(
&mut self,
index: usize,
) -> Result<&mut <GenSeq<T, Gen, C> as Get<usize>>::Output, <GenSeq<T, Gen, C> as TryGet<usize>>::Error>
fn try_get_mut( &mut self, index: usize, ) -> Result<&mut <GenSeq<T, Gen, C> as Get<usize>>::Output, <GenSeq<T, Gen, C> as TryGet<usize>>::Error>
Returns a mutable reference to the value.
Source§impl<T, Gen, C> WithCapacity for GenSeq<T, Gen, C>
impl<T, Gen, C> WithCapacity for GenSeq<T, Gen, C>
impl<T, Gen, C> Collection for GenSeq<T, Gen, C>
impl<T, Gen, C> CollectionBijective for GenSeq<T, Gen, C>
impl<T, Gen, C> CollectionStableKey for GenSeq<T, Gen, C>
impl<T, Gen, C> Copy for GenSeq<T, Gen, C>
impl<T, C, Gen> Eq for GenSeq<T, Gen, C>
Auto Trait Implementations§
impl<T, Gen, C> Freeze for GenSeq<T, Gen, C>where
C: Freeze,
impl<T, Gen, C> RefUnwindSafe for GenSeq<T, Gen, C>
impl<T, Gen, C> Send for GenSeq<T, Gen, C>
impl<T, Gen, C> Sync for GenSeq<T, Gen, C>
impl<T, Gen, C> Unpin for GenSeq<T, Gen, C>
impl<T, Gen, C> UnsafeUnpin for GenSeq<T, Gen, C>where
C: UnsafeUnpin,
impl<T, Gen, C> UnwindSafe for GenSeq<T, Gen, C>
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, V, S> CollectToGenMap<K, V, S> for I
impl<I, K, V, S> CollectToGenMap<K, V, S> for I
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<I, T1, T2> CollectToMap<T1, T2> for Iwhere
I: IntoIterator<Item = (T1, T2)>,
impl<I, T1, T2> CollectToMap<T1, T2> for Iwhere
I: IntoIterator<Item = (T1, T2)>,
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