Skip to main content

GenSeq

Struct GenSeq 

Source
pub struct GenSeq<T, Gen = u32, C = Vec<Entry<T, Gen>>>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,
{ /* private fields */ }

Implementations§

Source§

impl<T, C, Gen> GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source

pub fn try_from_raw_parts( values: C, free: usize, ) -> Result<GenSeq<T, Gen, C>, String>
where C: AsRef<[Entry<T, Gen>]>,

Source

pub unsafe fn from_raw_parts_unchecked( values: C, free: usize, len: usize, ) -> GenSeq<T, Gen, C>

Source§

impl<T, Gen, C> GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source

pub fn new() -> GenSeq<T, Gen, C>
where C: Default,

Source

pub fn clear(&mut self)
where C: Clear,

Clears the GenVec, removing all elements and resetting all GenID values.

After calling this method, any previous GenID is no longer valid (not enforced) and must not be used, as doing so may lead to undefined behavior.

Source§

impl<T, Gen, C> GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source

pub fn as_ref<'a>(&'a self) -> GenSeq<T, Gen, &'a [Entry<T, Gen>]>

Source

pub fn get_entry_from_index(&self, index: usize) -> Option<&Entry<T, Gen>>

Source

pub fn get_from_index(&self, index: usize) -> Option<&T>

Source

pub fn get_entry(&self, id: GenIDOf<T, Gen>) -> Option<&Entry<T, Gen>>

Source

pub fn get(&self, id: GenIDOf<T, Gen>) -> Option<&T>

Source

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

Source

pub fn entries( &self, ) -> impl Iterator<Item = &Entry<T, Gen>> + DoubleEndedIterator + FusedIterator

Source

pub const fn len(&self) -> usize

Source

pub fn iter(&self) -> Iter<'_, T, Gen>

Source

pub fn ids(&self) -> impl Iterator<Item = GenIDOf<T, Gen>>

Source

pub fn values(&self) -> impl Iterator<Item = &T>

Source

pub fn into_ids(self) -> impl Iterator<Item = GenIDOf<T, Gen>>
where C: IntoIterator<Item = Entry<T, Gen>>,

Source

pub fn into_values(self) -> impl Iterator<Item = T>
where C: IntoIterator<Item = Entry<T, Gen>>,

Source

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).

Source

pub fn to_owned(&self) -> GenSeq<T, Gen, <C as ToOwned>::Owned>
where C: ToOwned, <C as ToOwned>::Owned: AsRef<[Entry<T, Gen>]>,

Source§

impl<T, Gen, C> GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source

pub fn as_mut<'a>(&'a mut self) -> GenSeq<T, Gen, &'a mut [Entry<T, Gen>]>

Source

pub fn remove_all(&mut self)

Removes all elements from the GenVec and invalidates all existing GenID (enforced).

Source

pub fn rollback_insert(&mut self, id: GenIDOf<T, Gen>) -> Result<T, ()>
where C: Pop<Entry<T, Gen>>,

Source

pub fn try_insert_cyclic<F>( &mut self, init: F, ) -> Result<GenIDOf<T, Gen>, <C as TryPush<Entry<T, Gen>>>::Error>
where F: FnOnce(GenIDOf<T, Gen>) -> T, C: TryPush<Entry<T, Gen>>,

Source

pub fn try_insert( &mut self, value: T, ) -> Result<GenIDOf<T, Gen>, <C as TryPush<Entry<T, Gen>>>::Error>
where C: TryPush<Entry<T, Gen>>,

Source

pub fn insert_cyclic<F>(&mut self, init: F) -> GenIDOf<T, Gen>
where F: FnOnce(GenIDOf<T, Gen>) -> T, C: Push<Entry<T, Gen>>,

Source

pub fn insert(&mut self, value: T) -> GenIDOf<T, Gen>
where C: Push<Entry<T, Gen>>,

Source

pub fn get_mut_from_index(&mut self, index: usize) -> Option<&mut T>

Source

pub fn get_mut(&mut self, id: GenIDOf<T, Gen>) -> Option<&mut T>

Source

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

Source

pub fn remove_from_index(&mut self, index: usize) -> Option<T>

Source

pub fn rollback_remove( &mut self, id: GenIDOf<T, Gen>, value: T, ) -> Result<(), ()>

Source

pub fn remove(&mut self, id: GenIDOf<T, Gen>) -> Option<T>

Source

pub fn iter_mut(&mut self) -> IterMut<'_, T, Gen>

Source

pub fn values_mut(&mut self) -> impl Iterator<Item = &mut T>

Source

pub fn retain<F>(&mut self, f: F)
where F: FnMut(GenIDOf<T, Gen>, &T) -> bool,

Retains only the elements specified by the predicate.

In other words, remove all pairs (id, v) for which f(id, &v) returns false. The elements are visited in unsorted (and unspecified) order.

Source

pub fn retain_mut<F>(&mut self, f: F)
where F: FnMut(GenIDOf<T, Gen>, &mut T) -> bool,

Retains only the elements specified by the predicate.

In other words, remove all pairs (id, v) for which f(id, &mut v) returns false. The elements are visited in unsorted (and unspecified) order.

Source§

impl<T, Gen, C> GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source

pub fn append<C2>( &mut self, other: &mut GenSeq<T, Gen, C2>, ) -> impl GenIDUpdater<T, Gen> + 'static
where T: GenIDUpdatable<T, Gen> + 'static, C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]> + Push<Entry<T, Gen>>, C2: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]> + Clear,

Moves all the elements of other into self, leaving other empty by clearing it (don’t invalidate all previous GenID).

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,

Source§

fn as_ref(&self) -> &GenSeq<Entry<K, V>, Gen>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<K, Gen, S> AsRef<GenSeq<K, Gen>> for GenSetOf<K, Gen, S>
where K: Clone, Gen: IGeneration,

Source§

fn as_ref(&self) -> &GenSeq<K, Gen>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T, Gen, C> Capacity for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + Reserve, Gen: IGeneration,

Source§

fn capacity(&self) -> usize

Source§

impl<T, Gen, C> Clear for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + Clear, Gen: IGeneration,

Source§

fn clear(&mut self)

Source§

impl<T, Gen, C> Clone for GenSeq<T, Gen, C>
where T: Clone, Gen: Clone + IGeneration, C: Clone + AsRef<[Entry<T, Gen>]>,

Source§

fn clone(&self) -> GenSeq<T, Gen, C>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T, C, Gen> Debug for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration, T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T, Gen, C> Default for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + Default, Gen: IGeneration,

Source§

fn default() -> GenSeq<T, Gen, C>

Returns the “default value” for a type. Read more
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.
Source§

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>,

Source§

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)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

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>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]> + Push<Entry<T, Gen>>, Gen: IGeneration,

Source§

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)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

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 GenSeq<T, Gen, C>> for GenSeq<T, Gen, &'s [Entry<T, Gen>]>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration, T: 's,

Source§

fn from(value: &'s GenSeq<T, Gen, C>) -> GenSeq<T, Gen, &'s [Entry<T, Gen>]>

Converts to this type from the input type.
Source§

impl<'s, T, Gen, C> From<&'s mut GenSeq<T, Gen, C>> for GenSeq<T, Gen, &'s mut [Entry<T, Gen>]>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration, T: 's,

Source§

fn from( value: &'s mut GenSeq<T, Gen, C>, ) -> GenSeq<T, Gen, &'s mut [Entry<T, Gen>]>

Converts to this type from the input type.
Source§

impl<K, V, Gen, S> From<GenSeq<Entry<K, V>, Gen>> for GenMapOf<K, V, Gen, S>
where K: Clone, Gen: IGeneration, S: Default + Insert<K, GenIDOf<V, Gen>>,

Source§

fn from(values: GenSeq<Entry<K, V>, Gen>) -> GenMapOf<K, V, Gen, S>

Converts to this type from the input type.
Source§

impl<K, Gen, S> From<GenSeq<K, Gen>> for GenSetOf<K, Gen, S>
where K: Clone, Gen: IGeneration, S: Default + Insert<K, GenIDOf<K, Gen>>,

Source§

fn from(values: GenSeq<K, Gen>) -> GenSetOf<K, Gen, S>

Converts to this type from the input type.
Source§

impl<T, C, Gen> FromIterator<T> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + FromIterator<Entry<T, Gen>>, Gen: IGeneration,

Source§

fn from_iter<I>(iter: I) -> GenSeq<T, Gen, C>
where I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
Source§

impl<T, Gen, C> Get<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

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>

Returns a reference to the value.
Source§

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

Returns a reference to the value.
Source§

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

True if get(index) return None, false otherwise.
Source§

fn contains(&self, index: Idx) -> bool

Source§

impl<T, Gen, C> Get<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

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>

Returns a reference to the value.
Source§

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

Returns a reference to the value.
Source§

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

True if get(index) return None, false otherwise.
Source§

fn contains(&self, index: Idx) -> bool

Source§

impl<T, Gen, C> Get<usize> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

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>

Returns a reference to the value.
Source§

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

Returns a reference to the value.
Source§

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

True if get(index) return None, false otherwise.
Source§

fn contains(&self, index: Idx) -> bool

Source§

impl<T, Gen, C> GetManyMut<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

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]>

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]

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]

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
where Self::Output: Sized,

Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§

fn swap_or_panic(&mut self, a: Idx, b: Idx)
where Self::Output: Sized,

Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§

unsafe fn swap_unchecked(&mut self, a: Idx, b: Idx)
where Self::Output: Sized,

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>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

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]>

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]

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]

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
where Self::Output: Sized,

Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§

fn swap_or_panic(&mut self, a: Idx, b: Idx)
where Self::Output: Sized,

Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§

unsafe fn swap_unchecked(&mut self, a: Idx, b: Idx)
where Self::Output: Sized,

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>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

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]>

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]

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]

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
where Self::Output: Sized,

Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§

fn swap_or_panic(&mut self, a: Idx, b: Idx)
where Self::Output: Sized,

Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§

unsafe fn swap_unchecked(&mut self, a: Idx, b: Idx)
where Self::Output: Sized,

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>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

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.
Source§

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

Returns a mutable reference to the value.
Source§

fn replace(&mut self, index: Idx, value: Self::Output) -> Option<Self::Output>
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn replace_or_panic(&mut self, index: Idx, value: Self::Output) -> Self::Output
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

unsafe fn replace_unchecked( &mut self, index: Idx, value: Self::Output, ) -> Self::Output
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn set(&mut self, index: Idx, value: Self::Output) -> bool
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

fn set_or_panic(&mut self, index: Idx, value: Self::Output) -> &mut Self
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

unsafe fn set_unchecked(&mut self, index: Idx, value: Self::Output) -> &mut Self
where Self::Output: Sized,

Source§

impl<T, Gen, C> GetMut<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

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.
Source§

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

Returns a mutable reference to the value.
Source§

fn replace(&mut self, index: Idx, value: Self::Output) -> Option<Self::Output>
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn replace_or_panic(&mut self, index: Idx, value: Self::Output) -> Self::Output
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

unsafe fn replace_unchecked( &mut self, index: Idx, value: Self::Output, ) -> Self::Output
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn set(&mut self, index: Idx, value: Self::Output) -> bool
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

fn set_or_panic(&mut self, index: Idx, value: Self::Output) -> &mut Self
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

unsafe fn set_unchecked(&mut self, index: Idx, value: Self::Output) -> &mut Self
where Self::Output: Sized,

Source§

impl<T, Gen, C> GetMut<usize> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

fn get_mut( &mut self, index: usize, ) -> Option<&mut <GenSeq<T, Gen, C> as Get<usize>>::Output>

Returns a mutable reference to the value.
Source§

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

Returns a mutable reference to the value.
Source§

fn replace(&mut self, index: Idx, value: Self::Output) -> Option<Self::Output>
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn replace_or_panic(&mut self, index: Idx, value: Self::Output) -> Self::Output
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

unsafe fn replace_unchecked( &mut self, index: Idx, value: Self::Output, ) -> Self::Output
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn set(&mut self, index: Idx, value: Self::Output) -> bool
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

fn set_or_panic(&mut self, index: Idx, value: Self::Output) -> &mut Self
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

unsafe fn set_unchecked(&mut self, index: Idx, value: Self::Output) -> &mut Self
where Self::Output: Sized,

Source§

impl<T, C, Gen> Hash for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration, T: Hash,

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T, C, Gen> Index<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

type Output = T

The returned type after indexing.
Source§

fn index( &self, index: GenIDOf<T, Gen>, ) -> &<GenSeq<T, Gen, C> as Index<GenIDOf<T, Gen>>>::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<T, C, Gen> Index<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

type Output = T

The returned type after indexing.
Source§

fn index( &self, index: UntypedGenIDOf<Gen>, ) -> &<GenSeq<T, Gen, C> as Index<UntypedGenIDOf<Gen>>>::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<T, C, Gen> Index<usize> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &<GenSeq<T, Gen, C> as Index<usize>>::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<T, C, Gen> IndexMut<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

fn index_mut( &mut self, index: GenIDOf<T, Gen>, ) -> &mut <GenSeq<T, Gen, C> as Index<GenIDOf<T, Gen>>>::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<T, C, Gen> IndexMut<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

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 more
Source§

impl<T, C, Gen> IndexMut<usize> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

fn index_mut( &mut self, index: usize, ) -> &mut <GenSeq<T, Gen, C> as Index<usize>>::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'s, T, C, Gen> IntoIterator for &'s GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

type Item = (GenIDOf<T, Gen>, &'s T)

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'s, T, Gen>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> <&'s GenSeq<T, Gen, C> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'s, T, C, Gen> IntoIterator for &'s mut GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

type Item = (GenIDOf<T, Gen>, &'s mut T)

The type of the elements being iterated over.
Source§

type IntoIter = IterMut<'s, T, Gen>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> <&'s mut GenSeq<T, Gen, C> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
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,

Source§

type Item = (GenIDOf<T, Gen>, <<C as IntoIterator>::Item as GenVecEntryIntoValue<Gen>>::EntryItem)

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T, <C as IntoIterator>::IntoIter, Gen>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> <GenSeq<T, Gen, C> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T, Gen, C> Length for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

True if the container contains 0 elements. Read more
Source§

fn is_not_empty(&self) -> bool

True if the container contains at least one element. Will always be different than is_empty(). Read more
Source§

impl<T, C, C2, Gen> PartialEq<GenSeq<T, Gen, C2>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, C2: AsRef<[Entry<T, Gen>]>, Gen: IGeneration, T: PartialEq,

Source§

fn eq(&self, other: &GenSeq<T, Gen, C2>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T, Gen, C> Push<T> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]> + Push<Entry<T, Gen>>, Gen: IGeneration,

Source§

type Output = GenIDOf<T, Gen>

Source§

fn push(&mut self, value: T) -> <GenSeq<T, Gen, C> as Push<T>>::Output

Push an value and return it’s index.
Source§

impl<T, Gen, C> Remove<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

type Output = T

Source§

fn remove( &mut self, index: GenIDOf<T, Gen>, ) -> Option<<GenSeq<T, Gen, C> as Remove<GenIDOf<T, Gen>>>::Output>

Source§

impl<T, Gen, C> Remove<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

type Output = T

Source§

fn remove( &mut self, index: UntypedGenIDOf<Gen>, ) -> Option<<GenSeq<T, Gen, C> as Remove<UntypedGenIDOf<Gen>>>::Output>

Source§

impl<T, Gen, C> Remove<usize> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

type Output = T

Source§

fn remove( &mut self, index: usize, ) -> Option<<GenSeq<T, Gen, C> as Remove<usize>>::Output>

Source§

impl<T, Gen, C> Reserve for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + Reserve, Gen: IGeneration,

Source§

fn reserve(&mut self, additional: usize)

Source§

fn reserve_exact(&mut self, additional: usize)

Source§

fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Source§

fn try_reserve_exact( &mut self, additional: usize, ) -> Result<(), TryReserveError>

Source§

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,

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,

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,

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>
where C: AsRef<[Entry<T, Gen>]> + Serialize, Gen: IGeneration + Serialize, T: Serialize,

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,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T, Gen, C> Shrink for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + Shrink, Gen: IGeneration,

Source§

fn shrink_to_fit(&mut self)

Shrinks the capacity as much as possible.
Source§

fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity with a lower bound. The capacity will remain at least as large as both the length and the supplied value. If the current capacity is less than the lower limit, this is a no-op.
Source§

impl<T, Gen, C> Truncate for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + Truncate, Gen: IGeneration,

Source§

fn truncate(&mut self, len: usize)

Shortens it, keeping the first len elements and dropping the rest. Read more
Source§

impl<T, Gen, C> TryGet<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

type Error = GenVecError<T, Gen>

Source§

fn try_get( &self, id: GenIDOf<T, Gen>, ) -> Result<&<GenSeq<T, Gen, C> as Get<GenIDOf<T, Gen>>>::Output, <GenSeq<T, Gen, C> as TryGet<GenIDOf<T, Gen>>>::Error>

Returns a reference to the value.
Source§

impl<T, Gen, C> TryGet<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

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>

Returns a reference to the value.
Source§

impl<T, Gen, C> TryGet<usize> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

type Error = IndexOutOfBounds

Source§

fn try_get( &self, index: usize, ) -> Result<&<GenSeq<T, Gen, C> as Get<usize>>::Output, <GenSeq<T, Gen, C> as TryGet<usize>>::Error>

Returns a reference to the value.
Source§

impl<T, Gen, C> TryGetMut<GenIDOf<T, Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

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>

Returns a mutable reference to the value.
Source§

fn try_replace( &mut self, index: Idx, value: Self::Output, ) -> Result<Self::Output, Self::Error>
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn try_set( &mut self, index: Idx, value: Self::Output, ) -> Result<(), Self::Error>
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

impl<T, Gen, C> TryGetMut<UntypedGenIDOf<Gen>> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

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>

Returns a mutable reference to the value.
Source§

fn try_replace( &mut self, index: Idx, value: Self::Output, ) -> Result<Self::Output, Self::Error>
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn try_set( &mut self, index: Idx, value: Self::Output, ) -> Result<(), Self::Error>
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

impl<T, Gen, C> TryGetMut<usize> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]>, Gen: IGeneration,

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>

Returns a mutable reference to the value.
Source§

fn try_replace( &mut self, index: Idx, value: Self::Output, ) -> Result<Self::Output, Self::Error>
where Self::Output: Sized,

Replace the value and return the old one. Read more
Source§

fn try_set( &mut self, index: Idx, value: Self::Output, ) -> Result<(), Self::Error>
where Self::Output: Sized,

Set the value and drop the previous one.
Source§

impl<T, Gen, C> TryPush<T> for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + AsMut<[Entry<T, Gen>]> + TryPush<Entry<T, Gen>>, Gen: IGeneration,

Source§

type Error = <C as TryPush<Entry<T, Gen>>>::Error

Source§

fn try_push( &mut self, value: T, ) -> Result<<GenSeq<T, Gen, C> as Push<T>>::Output, <GenSeq<T, Gen, C> as TryPush<T>>::Error>

Push an value and return it’s index.
Source§

impl<T, Gen, C> WithCapacity for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]> + Reserve, Gen: IGeneration,

Source§

type Param = ()

Source§

fn with_capacity_and_param( capacity: usize, _: <GenSeq<T, Gen, C> as WithCapacity>::Param, ) -> GenSeq<T, Gen, C>

Source§

fn with_capacity(capacity: usize) -> Self
where Self: Sized, Self::Param: Default,

Source§

impl<T, Gen, C> Collection for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

impl<T, Gen, C> CollectionBijective for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

impl<T, Gen, C> CollectionStableKey for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration,

Source§

impl<T, Gen, C> Copy for GenSeq<T, Gen, C>
where T: Copy, Gen: Copy + IGeneration, C: Copy + AsRef<[Entry<T, Gen>]>,

Source§

impl<T, C, Gen> Eq for GenSeq<T, Gen, C>
where C: AsRef<[Entry<T, Gen>]>, Gen: IGeneration, T: PartialEq,

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>
where C: Send, T: Send, Gen: Send,

§

impl<T, Gen, C> Sync for GenSeq<T, Gen, C>
where C: Sync, T: Sync, Gen: Sync,

§

impl<T, Gen, C> Unpin for GenSeq<T, Gen, C>
where C: Unpin, T: Unpin, Gen: Unpin,

§

impl<T, Gen, C> UnsafeUnpin for GenSeq<T, Gen, C>
where C: UnsafeUnpin,

§

impl<T, Gen, C> UnwindSafe for GenSeq<T, Gen, C>
where C: UnwindSafe, T: UnwindSafe, Gen: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<S, T> CastInto<T> for S
where T: CastFrom<S>,

Source§

fn cast_into(self) -> T

Source§

impl<S, T> CastRangeInto<T> for S
where T: CastRangeFrom<S>,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<I, T> CollectTo<T> for I
where I: IntoIterator<Item = T>,

Source§

fn to_vec(self) -> Vec<T>

Source§

fn to_linkedlist(self) -> LinkedList<T>

Source§

fn to_vecdeque(self) -> VecDeque<T>

Source§

fn to_hashset(self) -> HashSet<T>
where T: Eq + Hash,

Source§

fn to_btreeset(self) -> BTreeSet<T>
where T: Ord,

Source§

impl<I, K, V, S> CollectToGenMap<K, V, S> for I
where I: IntoIterator<Item = (K, V)>, K: Clone,

Source§

fn to_genmap(self) -> GenMapOf<K, V, u32, S>
where GenMapOf<K, V, u32, S>: WithCapacity + Reserve, <GenMapOf<K, V, u32, S> as WithCapacity>::Param: Default, S: Default + Insert<K, GenIDOf<V>>,

Source§

impl<I, K, S> CollectToGenSet<K, S> for I
where I: IntoIterator<Item = K>, K: Clone,

Source§

fn to_genset(self) -> GenSetOf<K, u32, S>
where GenSetOf<K, u32, S>: WithCapacity + Reserve, <GenSetOf<K, u32, S> as WithCapacity>::Param: Default, S: Default + Insert<K, GenIDOf<K>> + for<'a> Remove<&'a K, Output = GenIDOf<K>>,

Source§

impl<I, T> CollectToGenVec<T> for I
where I: IntoIterator<Item = T>,

Source§

fn to_genvec(self) -> GenSeq<T>

Source§

impl<I, T1, T2> CollectToMap<T1, T2> for I
where I: IntoIterator<Item = (T1, T2)>,

Source§

fn to_hashmap(self) -> HashMap<T1, T2>
where T1: Eq + Hash,

Source§

fn to_btreemap(self) -> BTreeMap<T1, T2>
where T1: Ord,

Source§

impl<T> DefaultExtension for T
where T: Default + PartialEq,

Source§

impl<T> DefaultIsTripleUnderscore for T
where T: Default,

Source§

fn ___() -> T

The Self::default() method. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> Downcast for T
where T: Any,

Source§

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>

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)

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)

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
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromJson for T
where T: for<'de> Deserialize<'de>,

Source§

fn from_json_bytes(bytes: &[u8]) -> Result<Self, EncodeError>

Source§

fn from_json_with_reader<R>(reader: R) -> Result<Self, EncodeError>
where R: Read,

Source§

fn from_json(json: &str) -> Result<Self, EncodeError>

Source§

impl<T> FromRon for T
where T: for<'de> Deserialize<'de>,

Source§

fn from_ron_bytes(bytes: &[u8]) -> Result<Self, EncodeError>

Source§

fn from_ron_with_reader<R>(reader: R) -> Result<Self, EncodeError>
where R: Read,

Source§

fn from_ron(ron: &str) -> Result<Self, EncodeError>

Source§

impl<T> FromTmpBin for T
where T: for<'de> Deserialize<'de>,

Source§

fn from_tmp_bin_bytes(bytes: &[u8]) -> Result<Self, EncodeError>

Source§

fn from_tmp_bin_with_reader<R>(reader: R) -> Result<Self, EncodeError>
where R: Read,

Source§

impl<T> FromXml for T
where T: for<'de> Deserialize<'de>,

Source§

fn from_xml_bytes(bytes: &[u8]) -> Result<Self, EncodeError>

Source§

fn from_xml_with_reader<R>(reader: R) -> Result<Self, EncodeError>
where R: Read,

Source§

fn from_xml(xml: &str) -> Result<Self, EncodeError>

Source§

impl<T> Has<T> for T
where T: Copy,

Source§

fn retrieve(&self) -> T

Source§

impl<T> HasMut<T> for T

Source§

fn retrive_mut(&mut self) -> &mut T

Source§

impl<T> HasRef<T> for T

Source§

fn retrive_ref(&self) -> &T

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<'a, Item, T> IterExtension<'a, Item> for T
where &'a T: IntoIterator<Item = Item> + 'a,

Source§

fn iter(&'a self) -> <&'a Self as IntoIterator>::IntoIter

Source§

impl<Item, T> IterPredicate<Item> for T
where T: IntoIterator<Item = Item>,

Source§

fn any<P>(self, p: P) -> bool
where P: FnMut(Item) -> bool,

Source§

fn all<P>(self, p: P) -> bool
where P: FnMut(Item) -> bool,

Source§

fn any_with<P, O>(self, other: O, p: P) -> bool
where P: FnMut(Item, Item) -> bool, O: IntoIterator<Item = Item>,

Source§

fn all_with<P, O>(self, other: O, p: P) -> bool
where P: FnMut(Item, Item) -> bool, O: IntoIterator<Item = Item>,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> SplatCoord1 for T
where T: Copy,

Source§

fn splat1(self) -> Vector<Self, 1>

Source§

impl<T> SplatCoord2 for T
where T: Copy,

Source§

fn splat2(self) -> Vector<Self, 2>

Source§

impl<T> SplatCoord3 for T
where T: Copy,

Source§

fn splat3(self) -> Vector<Self, 3>

Source§

impl<T> SplatCoord4 for T
where T: Copy,

Source§

fn splat4(self) -> Vector<Self, 4>

Source§

impl<T> ToDebug for T
where T: Debug,

Source§

impl<T> ToJson for T
where T: Serialize,

Source§

fn to_json(&self) -> Result<String, EncodeError>

Source§

fn to_json_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>
where W: Write,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToRon for T
where T: Serialize,

Source§

fn to_ron(&self) -> Result<String, EncodeError>

Source§

fn to_ron_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>
where W: Write,

Source§

impl<T> ToTmpBin for T
where T: Serialize,

Source§

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,

Intended for short-term storage of data in a binary format, such as during data transfer. Read more
Source§

impl<T> ToXml for T
where T: Serialize,

Source§

fn to_xml(&self) -> Result<String, EncodeError>

Source§

fn to_xml_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>
where W: Write,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Async for T
where T: Send + Sync + 'static,

Source§

impl<T> AsyncDebug for T
where T: Async + Debug,

Source§

impl<'de, T> CfgDeserialize<'de> for T
where T: Deserialize<'de> + ?Sized,

Source§

impl<T> CfgSerialize for T
where T: Serialize + ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,