Struct IndexedSamples
pub struct IndexedSamples<'a, S: ?Sized + 'a, T: 'a> { /* private fields */ }
An iterator over multiple slice elements.
This struct is created by
IndexedRandom::sample.
Trait Implementations
impl<'a, S: Debug + ?Sized + 'a, T: Debug + 'a> Debug for IndexedSamples<'a, S, T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'a, S: Index<usize, Output = T> + ?Sized + 'a, T: 'a> ExactSizeIterator for IndexedSamples<'a, S, T>
fn len(&self) -> usize
impl<'a, S: Index<usize, Output = T> + ?Sized + 'a, T: 'a> Iterator for IndexedSamples<'a, S, T>
type Item = &'a T;fn next(&mut self) -> Option<Self::Item>fn size_hint(&self) -> (usize, Option<usize>)
Auto Trait Implementations
impl<'a, S, T> Freeze for IndexedSamples<'a, S, T>
where
&'a S: Freeze,
PhantomData<T>: Freeze,
S: ?Sized,
impl<'a, S, T> RefUnwindSafe for IndexedSamples<'a, S, T>
where
&'a S: RefUnwindSafe,
PhantomData<T>: RefUnwindSafe,
S: ?Sized,
impl<'a, S, T> Send for IndexedSamples<'a, S, T>
where
&'a S: Send,
PhantomData<T>: Send,
S: ?Sized,
impl<'a, S, T> Sync for IndexedSamples<'a, S, T>
where
&'a S: Sync,
PhantomData<T>: Sync,
S: ?Sized,
impl<'a, S, T> Unpin for IndexedSamples<'a, S, T>
where
&'a S: Unpin,
PhantomData<T>: Unpin,
S: ?Sized,
impl<'a, S, T> UnsafeUnpin for IndexedSamples<'a, S, T>
where
&'a S: UnsafeUnpin,
PhantomData<T>: UnsafeUnpin,
S: ?Sized,
impl<'a, S, T> UnwindSafe for IndexedSamples<'a, S, T>
where
&'a S: UnwindSafe,
PhantomData<T>: UnwindSafe,
S: ?Sized,
Blanket Implementations
impl<I> IntoIterator for IndexedSamples<'a, S, T>
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<I> IteratorRandom for IndexedSamples<'a, S, T>
where
I: Iterator,
impl<T> Any for IndexedSamples<'a, S, T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for IndexedSamples<'a, S, T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for IndexedSamples<'a, S, T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for IndexedSamples<'a, S, T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for IndexedSamples<'a, S, T>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for IndexedSamples<'a, S, T>
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for IndexedSamples<'a, S, T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>