Struct Iter
pub struct Iter<D, R, T> { /* private fields */ }
An iterator over a Distribution
This iterator yields random values of type T with distribution D
from a random generator of type R.
Construct this struct using Distribution::sample_iter or
RngExt::sample_iter. It is also used by RngExt::random_iter and
crate::random_iter.
Trait Implementations
impl<D, R, T> FusedIterator for Iter<D, R, T>
where
D: Distribution<T>,
R: Rng,
impl<D, R, T> Iterator for Iter<D, R, T>
where
D: Distribution<T>,
R: Rng,
type Item = T;fn next(&mut self) -> Option<T>fn size_hint(&self) -> (usize, Option<usize>)
impl<D: Debug, R: Debug, T: Debug> Debug for Iter<D, R, T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<D, R, T> Freeze for Iter<D, R, T>
where
D: Freeze,
R: Freeze,
PhantomData<T>: Freeze,
impl<D, R, T> RefUnwindSafe for Iter<D, R, T>
where
D: RefUnwindSafe,
R: RefUnwindSafe,
PhantomData<T>: RefUnwindSafe,
impl<D, R, T> Send for Iter<D, R, T>
where
D: Send,
R: Send,
PhantomData<T>: Send,
impl<D, R, T> Sync for Iter<D, R, T>
where
D: Sync,
R: Sync,
PhantomData<T>: Sync,
impl<D, R, T> Unpin for Iter<D, R, T>
where
D: Unpin,
R: Unpin,
PhantomData<T>: Unpin,
impl<D, R, T> UnsafeUnpin for Iter<D, R, T>
where
D: UnsafeUnpin,
R: UnsafeUnpin,
PhantomData<T>: UnsafeUnpin,
impl<D, R, T> UnwindSafe for Iter<D, R, T>
where
D: UnwindSafe,
R: UnwindSafe,
PhantomData<T>: UnwindSafe,
Blanket Implementations
impl<I> IntoIterator for Iter<D, R, T>
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<I> IteratorRandom for Iter<D, R, T>
where
I: Iterator,
impl<T> Any for Iter<D, R, T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Iter<D, R, T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Iter<D, R, T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for Iter<D, R, T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for Iter<D, R, 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 Iter<D, R, T>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Iter<D, R, T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>