pub struct IndexBase<Idx = Udx, K = VertexIndex> { /* private fields */ }
Implementations§
Source§impl<T, K> IndexBase<T, K>where
T: RawIndex,
impl<T, K> IndexBase<T, K>where
T: RawIndex,
Sourcepub fn new_with<F>(index: F) -> Selfwhere
F: FnOnce() -> T,
pub fn new_with<F>(index: F) -> Selfwhere
F: FnOnce() -> T,
creates a new instance of IndexBase
using the given function to generate the value
Sourcepub fn as_mut_ptr(&mut self) -> *mut T
pub fn as_mut_ptr(&mut self) -> *mut T
returns a mutable pointer to the inner value
Sourcepub fn as_raw_box(&self) -> Box<dyn RawIndex>where
T: Clone,
pub fn as_raw_box(&self) -> Box<dyn RawIndex>where
T: Clone,
converts the a reference to a boxed raw index trait object
Sourcepub fn into_raw_box(self) -> Box<dyn RawIndex>
pub fn into_raw_box(self) -> Box<dyn RawIndex>
boxes up the raw index value for generic use
Sourcepub fn map<U, F>(self, f: F) -> IndexBase<U, K> ⓘ
pub fn map<U, F>(self, f: F) -> IndexBase<U, K> ⓘ
apply a function to the inner value and returns a new Index wrapping the result
Sourcepub const fn replace(&mut self, index: T) -> T
pub const fn replace(&mut self, index: T) -> T
replace
and return the old value after replacing it with the
given value
Sourcepub fn take(&mut self) -> Twhere
T: Default,
pub fn take(&mut self) -> Twhere
T: Default,
take
the value and replace it with the default value
Sourcepub fn with<U: RawIndex>(self, value: U) -> IndexBase<U, K> ⓘ
pub fn with<U: RawIndex>(self, value: U) -> IndexBase<U, K> ⓘ
consumes the current index to create another with the given value
Sourcepub fn dec(self) -> IndexBase<<T as Sub>::Output, K> ⓘ
pub fn dec(self) -> IndexBase<<T as Sub>::Output, K> ⓘ
decrements the index value by one and returns a new instance
Sourcepub fn dec_inplace(&mut self)
pub fn dec_inplace(&mut self)
mutably decrements the index value by one
Sourcepub fn inc(self) -> IndexBase<<T as Add>::Output, K> ⓘ
pub fn inc(self) -> IndexBase<<T as Add>::Output, K> ⓘ
increments the index value by one and consumes the current instance to create another with the new value.
Sourcepub fn inc_inplace(&mut self)
pub fn inc_inplace(&mut self)
mutably increments the index value by 1
Sourcepub fn step(&mut self) -> IndexResult<Self>where
T: AddStep<Output = T>,
pub fn step(&mut self) -> IndexResult<Self>where
T: AddStep<Output = T>,
increments the current index and returns the previous instance of the index.
use rshyper_core::EdgeId;
let mut edge_id = EdgeId::<usize>::zero();
let e0 = edge_id.step()?;
let e1 = edge_id.step()?;
let e2 = edge_id.step()?;
assert_eq!(e0.get(), &0);
assert_eq!(e1.get(), &1);
assert_eq!(e2.get(), &2);
Sourcepub fn step_with<F>(&mut self, f: F) -> IndexResult<Self>
pub fn step_with<F>(&mut self, f: F) -> IndexResult<Self>
replaces the current value with the next one computed using the provided function and returns the previous instance of the index.
Sourcepub fn next_with<U, F>(self, f: F) -> IndexResult<IndexBase<U, K>>
pub fn next_with<U, F>(self, f: F) -> IndexResult<IndexBase<U, K>>
similar to step_with
, however, rather than replacing the
current value with the computed value, it returns a new instance of the index
containing the computed value.
pub fn into_inner(self) -> T
value
insteadSource§impl<K> IndexBase<usize, K>
generic implementations for the IndexBase<T, K>
enabled by the rand
feature
impl<K> IndexBase<usize, K>
generic implementations for the IndexBase<T, K>
enabled by the rand
feature
Source§impl<T, K> IndexBase<T, K>where
T: RawIndex,
generic implementations for the IndexBase<T, K>
enabled by the rand
feature
impl<T, K> IndexBase<T, K>where
T: RawIndex,
generic implementations for the IndexBase<T, K>
enabled by the rand
feature
Sourcepub fn rand_step(&mut self) -> Selfwhere
StandardUniform: Distribution<T>,
pub fn rand_step(&mut self) -> Selfwhere
StandardUniform: Distribution<T>,
replaces the current value with a randomly generated value and returns a new instance
of IndexBase
with the previous value.
Sourcepub fn random() -> Selfwhere
StandardUniform: Distribution<T>,
pub fn random() -> Selfwhere
StandardUniform: Distribution<T>,
generate a random index from a value of type T
Sourcepub fn random_between<R>(range: R) -> Selfwhere
R: SampleRange<T>,
T: SampleUniform,
pub fn random_between<R>(range: R) -> Selfwhere
R: SampleRange<T>,
T: SampleUniform,
returns a new index randomly generated within the provided range
Sourcepub fn random_with<R, Dist>(rng: &mut R, distr: Dist) -> Self
pub fn random_with<R, Dist>(rng: &mut R, distr: Dist) -> Self
generate a random index from a value of type T
using the provided Rng
Source§impl<K> IndexBase<usize, K>
impl<K> IndexBase<usize, K>
Sourcepub fn atomic() -> Self
pub fn atomic() -> Self
returns a new index generated using an AtomicUsize
This method is useful in that it is no_std
compatible, thread-safe, and capable of
generating unique indices in a concurrent environment.
Sourcepub fn create() -> Self
pub fn create() -> Self
a helper method that dynamically initializes the index based on the enabled features:
rand
: if enabled, use random number generation to generate the index.fallback
: otherwise, use an atomic counter to generate the index.
Sourcepub fn atomic_next(&mut self) -> Self
pub fn atomic_next(&mut self) -> Self
atomically generates a the next index, replacing the current value with the generated one and returning the previous value.
Sourcepub fn generate(&mut self) -> Self
pub fn generate(&mut self) -> Self
the generate
is useful for instances where the type Idx
of
the IndexBase
is not generalized, automatically using random number generation
if the rand
feature is enabled, or an atomic counter otherwise. The method is also
useful in that it generates usize
indices, whcih are the most common instances, yet
aren’t direct implementors of StandardUniform
.
Trait Implementations§
Source§impl<K, A, B> AddAssign<B> for IndexBase<A, K>where
A: AddAssign<B>,
impl<K, A, B> AddAssign<B> for IndexBase<A, K>where
A: AddAssign<B>,
Source§fn add_assign(&mut self, rhs: B)
fn add_assign(&mut self, rhs: B)
+=
operation. Read moreSource§impl<K, A, B> BitAndAssign<B> for IndexBase<A, K>where
A: BitAndAssign<B>,
impl<K, A, B> BitAndAssign<B> for IndexBase<A, K>where
A: BitAndAssign<B>,
Source§fn bitand_assign(&mut self, rhs: B)
fn bitand_assign(&mut self, rhs: B)
&=
operation. Read moreSource§impl<K, A, B> BitOrAssign<B> for IndexBase<A, K>where
A: BitOrAssign<B>,
impl<K, A, B> BitOrAssign<B> for IndexBase<A, K>where
A: BitOrAssign<B>,
Source§fn bitor_assign(&mut self, rhs: B)
fn bitor_assign(&mut self, rhs: B)
|=
operation. Read moreSource§impl<K, A, B> BitXorAssign<B> for IndexBase<A, K>where
A: BitXorAssign<B>,
impl<K, A, B> BitXorAssign<B> for IndexBase<A, K>where
A: BitXorAssign<B>,
Source§fn bitxor_assign(&mut self, rhs: B)
fn bitxor_assign(&mut self, rhs: B)
^=
operation. Read moreSource§impl<T, S, K, Idx> BorrowMut<IndexBase<Idx, EdgeIndex>> for Edge<T, S, K, Idx>
impl<T, S, K, Idx> BorrowMut<IndexBase<Idx, EdgeIndex>> for Edge<T, S, K, Idx>
Source§fn borrow_mut(&mut self) -> &mut EdgeId<Idx>
fn borrow_mut(&mut self) -> &mut EdgeId<Idx>
Source§impl<S, K, Idx> BorrowMut<IndexBase<Idx, EdgeIndex>> for Link<S, K, Idx>
impl<S, K, Idx> BorrowMut<IndexBase<Idx, EdgeIndex>> for Link<S, K, Idx>
Source§fn borrow_mut(&mut self) -> &mut EdgeId<Idx>
fn borrow_mut(&mut self) -> &mut EdgeId<Idx>
Source§impl<T, K> BorrowMut<T> for IndexBase<T, K>where
T: RawIndex,
impl<T, K> BorrowMut<T> for IndexBase<T, K>where
T: RawIndex,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<'de, Idx, K> Deserialize<'de> for IndexBase<Idx, K>where
Idx: Deserialize<'de>,
impl<'de, Idx, K> Deserialize<'de> for IndexBase<Idx, K>where
Idx: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<T, K> Distribution<IndexBase<T, K>> for StandardNormal
impl<T, K> Distribution<IndexBase<T, K>> for StandardNormal
Source§impl<T, K> Distribution<IndexBase<T, K>> for StandardUniform
impl<T, K> Distribution<IndexBase<T, K>> for StandardUniform
Source§impl<K, A, B> DivAssign<B> for IndexBase<A, K>where
A: DivAssign<B>,
impl<K, A, B> DivAssign<B> for IndexBase<A, K>where
A: DivAssign<B>,
Source§fn div_assign(&mut self, rhs: B)
fn div_assign(&mut self, rhs: B)
/=
operation. Read moreSource§impl<S, K, Idx> FromIterator<IndexBase<Idx>> for Link<S, K, Idx>
impl<S, K, Idx> FromIterator<IndexBase<Idx>> for Link<S, K, Idx>
Source§impl<T, K> Iterator for IndexBase<T, K>
impl<T, K> Iterator for IndexBase<T, K>
Source§fn next(&mut self) -> Option<Self::Item>
fn next(&mut self) -> Option<Self::Item>
Source§fn next_chunk<const N: usize>(
&mut self,
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
fn next_chunk<const N: usize>(
&mut self,
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
iter_next_chunk
)N
values. Read more1.0.0 · Source§fn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
1.0.0 · Source§fn count(self) -> usizewhere
Self: Sized,
fn count(self) -> usizewhere
Self: Sized,
1.0.0 · Source§fn last(self) -> Option<Self::Item>where
Self: Sized,
fn last(self) -> Option<Self::Item>where
Self: Sized,
Source§fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
iter_advance_by
)n
elements. Read more1.0.0 · Source§fn nth(&mut self, n: usize) -> Option<Self::Item>
fn nth(&mut self, n: usize) -> Option<Self::Item>
n
th element of the iterator. Read more1.28.0 · Source§fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
1.0.0 · Source§fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
1.0.0 · Source§fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where
Self: Sized,
U: IntoIterator,
fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where
Self: Sized,
U: IntoIterator,
Source§fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
iter_intersperse
)separator
between adjacent
items of the original iterator. Read moreSource§fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
iter_intersperse
)separator
between adjacent items of the original iterator. Read more1.0.0 · Source§fn map<B, F>(self, f: F) -> Map<Self, F>
fn map<B, F>(self, f: F) -> Map<Self, F>
1.0.0 · Source§fn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
1.0.0 · Source§fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
1.0.0 · Source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
1.0.0 · Source§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
1.0.0 · Source§fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
1.57.0 · Source§fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
1.0.0 · Source§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
n
elements. Read more1.0.0 · Source§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
n
elements, or fewer
if the underlying iterator ends sooner. Read more1.0.0 · Source§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
1.29.0 · Source§fn flatten(self) -> Flatten<Self>
fn flatten(self) -> Flatten<Self>
Source§fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
iter_map_windows
)f
for each contiguous window of size N
over
self
and returns an iterator over the outputs of f
. Like slice::windows()
,
the windows during mapping overlap as well. Read more1.0.0 · Source§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
1.0.0 · Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Iterator
. Read moreSource§fn collect_into<E>(self, collection: &mut E) -> &mut E
fn collect_into<E>(self, collection: &mut E) -> &mut E
iter_collect_into
)1.0.0 · Source§fn partition<B, F>(self, f: F) -> (B, B)
fn partition<B, F>(self, f: F) -> (B, B)
Source§fn is_partitioned<P>(self, predicate: P) -> bool
fn is_partitioned<P>(self, predicate: P) -> bool
iter_is_partitioned
)true
precede all those that return false
. Read more1.27.0 · Source§fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
1.27.0 · Source§fn try_for_each<F, R>(&mut self, f: F) -> R
fn try_for_each<F, R>(&mut self, f: F) -> R
1.0.0 · Source§fn fold<B, F>(self, init: B, f: F) -> B
fn fold<B, F>(self, init: B, f: F) -> B
1.51.0 · Source§fn reduce<F>(self, f: F) -> Option<Self::Item>
fn reduce<F>(self, f: F) -> Option<Self::Item>
Source§fn try_reduce<R>(
&mut self,
f: impl FnMut(Self::Item, Self::Item) -> R,
) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
fn try_reduce<R>( &mut self, f: impl FnMut(Self::Item, Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
iterator_try_reduce
)1.0.0 · Source§fn all<F>(&mut self, f: F) -> bool
fn all<F>(&mut self, f: F) -> bool
1.0.0 · Source§fn any<F>(&mut self, f: F) -> bool
fn any<F>(&mut self, f: F) -> bool
1.0.0 · Source§fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
1.30.0 · Source§fn find_map<B, F>(&mut self, f: F) -> Option<B>
fn find_map<B, F>(&mut self, f: F) -> Option<B>
Source§fn try_find<R>(
&mut self,
f: impl FnMut(&Self::Item) -> R,
) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
fn try_find<R>( &mut self, f: impl FnMut(&Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
try_find
)1.0.0 · Source§fn position<P>(&mut self, predicate: P) -> Option<usize>
fn position<P>(&mut self, predicate: P) -> Option<usize>
1.0.0 · Source§fn max(self) -> Option<Self::Item>
fn max(self) -> Option<Self::Item>
1.0.0 · Source§fn min(self) -> Option<Self::Item>
fn min(self) -> Option<Self::Item>
1.6.0 · Source§fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
1.15.0 · Source§fn max_by<F>(self, compare: F) -> Option<Self::Item>
fn max_by<F>(self, compare: F) -> Option<Self::Item>
1.6.0 · Source§fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
1.15.0 · Source§fn min_by<F>(self, compare: F) -> Option<Self::Item>
fn min_by<F>(self, compare: F) -> Option<Self::Item>
1.0.0 · Source§fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
1.36.0 · Source§fn copied<'a, T>(self) -> Copied<Self>
fn copied<'a, T>(self) -> Copied<Self>
Source§fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where
Self: Sized,
fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where
Self: Sized,
iter_array_chunks
)N
elements of the iterator at a time. Read more1.11.0 · Source§fn product<P>(self) -> P
fn product<P>(self) -> P
Source§fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
iter_order_by
)Iterator
with those
of another with respect to the specified comparison function. Read more1.5.0 · Source§fn partial_cmp<I>(self, other: I) -> Option<Ordering>
fn partial_cmp<I>(self, other: I) -> Option<Ordering>
PartialOrd
elements of
this Iterator
with those of another. The comparison works like short-circuit
evaluation, returning a result without comparing the remaining elements.
As soon as an order can be determined, the evaluation stops and a result is returned. Read moreSource§fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where
Self: Sized,
I: IntoIterator,
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where
Self: Sized,
I: IntoIterator,
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
iter_order_by
)Iterator
with those
of another with respect to the specified comparison function. Read moreSource§fn eq_by<I, F>(self, other: I, eq: F) -> bool
fn eq_by<I, F>(self, other: I, eq: F) -> bool
iter_order_by
)1.5.0 · Source§fn lt<I>(self, other: I) -> bool
fn lt<I>(self, other: I) -> bool
Iterator
are lexicographically
less than those of another. Read more1.5.0 · Source§fn le<I>(self, other: I) -> bool
fn le<I>(self, other: I) -> bool
Iterator
are lexicographically
less or equal to those of another. Read more1.5.0 · Source§fn gt<I>(self, other: I) -> bool
fn gt<I>(self, other: I) -> bool
Iterator
are lexicographically
greater than those of another. Read more1.5.0 · Source§fn ge<I>(self, other: I) -> bool
fn ge<I>(self, other: I) -> bool
Iterator
are lexicographically
greater than or equal to those of another. Read more1.82.0 · Source§fn is_sorted(self) -> bool
fn is_sorted(self) -> bool
1.82.0 · Source§fn is_sorted_by<F>(self, compare: F) -> bool
fn is_sorted_by<F>(self, compare: F) -> bool
1.82.0 · Source§fn is_sorted_by_key<F, K>(self, f: F) -> bool
fn is_sorted_by_key<F, K>(self, f: F) -> bool
Source§impl<K, A, B> MulAssign<B> for IndexBase<A, K>where
A: MulAssign<B>,
impl<K, A, B> MulAssign<B> for IndexBase<A, K>where
A: MulAssign<B>,
Source§fn mul_assign(&mut self, rhs: B)
fn mul_assign(&mut self, rhs: B)
*=
operation. Read moreSource§impl<T, K> Num for IndexBase<T, K>where
T: Num,
impl<T, K> Num for IndexBase<T, K>where
T: Num,
type FromStrRadixErr = <T as Num>::FromStrRadixErr
Source§fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
2..=36
). Read moreSource§impl<Idx: Ord, K: Ord> Ord for IndexBase<Idx, K>
impl<Idx: Ord, K: Ord> Ord for IndexBase<Idx, K>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<'a, T, K> PartialOrd<&'a T> for IndexBase<T, K>where
T: PartialOrd,
impl<'a, T, K> PartialOrd<&'a T> for IndexBase<T, K>where
T: PartialOrd,
Source§impl<'a, T, K> PartialOrd<&'a mut T> for IndexBase<T, K>where
T: PartialOrd,
impl<'a, T, K> PartialOrd<&'a mut T> for IndexBase<T, K>where
T: PartialOrd,
Source§impl<T, K> PartialOrd<T> for IndexBase<T, K>where
T: PartialOrd,
impl<T, K> PartialOrd<T> for IndexBase<T, K>where
T: PartialOrd,
Source§impl<Idx: PartialOrd, K: PartialOrd> PartialOrd for IndexBase<Idx, K>
impl<Idx: PartialOrd, K: PartialOrd> PartialOrd for IndexBase<Idx, K>
Source§impl<K, A, B> RemAssign<B> for IndexBase<A, K>where
A: RemAssign<B>,
impl<K, A, B> RemAssign<B> for IndexBase<A, K>where
A: RemAssign<B>,
Source§fn rem_assign(&mut self, rhs: B)
fn rem_assign(&mut self, rhs: B)
%=
operation. Read moreSource§impl<K, A, B> ShlAssign<B> for IndexBase<A, K>where
A: ShlAssign<B>,
impl<K, A, B> ShlAssign<B> for IndexBase<A, K>where
A: ShlAssign<B>,
Source§fn shl_assign(&mut self, rhs: B)
fn shl_assign(&mut self, rhs: B)
<<=
operation. Read moreSource§impl<K, A, B> ShrAssign<B> for IndexBase<A, K>where
A: ShrAssign<B>,
impl<K, A, B> ShrAssign<B> for IndexBase<A, K>where
A: ShrAssign<B>,
Source§fn shr_assign(&mut self, rhs: B)
fn shr_assign(&mut self, rhs: B)
>>=
operation. Read moreSource§impl<K, A, B> SubAssign<B> for IndexBase<A, K>where
A: SubAssign<B>,
impl<K, A, B> SubAssign<B> for IndexBase<A, K>where
A: SubAssign<B>,
Source§fn sub_assign(&mut self, rhs: B)
fn sub_assign(&mut self, rhs: B)
-=
operation. Read moreimpl<Idx: Copy, K: Copy> Copy for IndexBase<Idx, K>
impl<T, K> Eq for IndexBase<T, K>where
T: Eq,
Auto Trait Implementations§
impl<Idx, K> Freeze for IndexBase<Idx, K>where
Idx: Freeze,
impl<Idx, K> RefUnwindSafe for IndexBase<Idx, K>where
Idx: RefUnwindSafe,
K: RefUnwindSafe,
impl<Idx, K> Send for IndexBase<Idx, K>
impl<Idx, K> Sync for IndexBase<Idx, K>
impl<Idx, K> Unpin for IndexBase<Idx, K>
impl<Idx, K> UnwindSafe for IndexBase<Idx, K>where
Idx: UnwindSafe,
K: UnwindSafe,
Blanket Implementations§
Source§impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
Source§impl<I> IntoIterator for Iwhere
I: Iterator,
impl<I> IntoIterator for Iwhere
I: Iterator,
Source§impl<T> IntoWeight<T> for T
impl<T> IntoWeight<T> for T
fn into_weight(self) -> Weight<T>
Source§impl<I> IteratorRandom for Iwhere
I: Iterator,
impl<I> IteratorRandom for Iwhere
I: Iterator,
Source§fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
Source§impl<R> Rng for R
impl<R> Rng for R
Source§fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
StandardUniform
distribution. Read moreSource§fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
Source§fn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
fn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
Source§fn random_bool(&mut self, p: f64) -> bool
fn random_bool(&mut self, p: f64) -> bool
p
of being true. Read moreSource§fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
numerator/denominator
of being
true. Read moreSource§fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
Source§fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
Source§fn gen<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
fn gen<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
random
to avoid conflict with the new gen
keyword in Rust 2024.Rng::random
.Source§fn gen_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
fn gen_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
random_range
Rng::random_range
.Source§impl<R> TryRngCore for R
impl<R> TryRngCore for R
Source§type Error = Infallible
type Error = Infallible
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
u32
.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
u64
.Source§fn try_fill_bytes(
&mut self,
dst: &mut [u8],
) -> Result<(), <R as TryRngCore>::Error>
fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>
dest
entirely with random data.Source§fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
UnwrapMut
wrapper.Source§fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>where
Self: Sized,
fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>where
Self: Sized,
RngCore
to a RngReadAdapter
.