pub struct CollectionWrap<T: ?Sized, C: Collection<T>> { /* private fields */ }Expand description
Wrapper that implements indexing.
Implementations§
Source§impl<T: ?Sized, C: Collection<T>> CollectionWrap<T, C>
impl<T: ?Sized, C: Collection<T>> CollectionWrap<T, C>
pub fn new(inner: C) -> Self
pub fn iter(&self) -> CollectionIter<'_, T, C> ⓘ
pub fn for_each_mut<F>(&mut self, f: F)
pub fn map_mut<'a, B, F>(&'a mut self, f: F) -> impl Iterator<Item = B>
pub fn into_inner(self) -> C
Trait Implementations§
Source§impl<T: ?Sized, C: Collection<T>> Deref for CollectionWrap<T, C>
impl<T: ?Sized, C: Collection<T>> Deref for CollectionWrap<T, C>
Source§impl<T: ?Sized, C: Collection<T>> DerefMut for CollectionWrap<T, C>
impl<T: ?Sized, C: Collection<T>> DerefMut for CollectionWrap<T, C>
Source§impl<T: ?Sized, C: Collection<T>> From<C> for CollectionWrap<T, C>
impl<T: ?Sized, C: Collection<T>> From<C> for CollectionWrap<T, C>
Source§impl<T: ?Sized, C: Collection<T>> Index<usize> for CollectionWrap<T, C>
impl<T: ?Sized, C: Collection<T>> Index<usize> for CollectionWrap<T, C>
Source§impl<T: ?Sized, C: Collection<T>> IndexMut<usize> for CollectionWrap<T, C>
impl<T: ?Sized, C: Collection<T>> IndexMut<usize> for CollectionWrap<T, C>
Auto Trait Implementations§
impl<T, C> Freeze for CollectionWrap<T, C>
impl<T, C> RefUnwindSafe for CollectionWrap<T, C>
impl<T, C> Send for CollectionWrap<T, C>
impl<T, C> Sync for CollectionWrap<T, C>
impl<T, C> Unpin for CollectionWrap<T, C>
impl<T, C> UnsafeUnpin for CollectionWrap<T, C>where
C: UnsafeUnpin,
T: ?Sized,
impl<T, C> UnwindSafe for CollectionWrap<T, 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<R> CryptoRng for R
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<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<R> RngCore for Rwhere
R: Rng,
Source§impl<R> RngExt for R
impl<R> RngExt for R
Source§fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
Return a random value via the
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>,
Generate a random value in the given range. Read more
Source§fn random_bool(&mut self, p: f64) -> bool
fn random_bool(&mut self, p: f64) -> bool
Return a bool with a probability
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
Return a bool with a probability of
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>,
Sample a new value, using the given distribution. Read more
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,
Create an iterator that generates values using the given distribution. Read more