Struct rand::distributions::DistMap  
source · pub struct DistMap<D, F, T, S> { /* private fields */ }Expand description
A distribution of values of type S derived from the distribution D
by mapping its output of type T through the closure F.
This struct is created by the Distribution::map method.
See its documentation for more.
Trait Implementations§
source§impl<D, F, T, S> Distribution<S> for DistMap<D, F, T, S>where
    D: Distribution<T>,
    F: Fn(T) -> S,
 
impl<D, F, T, S> Distribution<S> for DistMap<D, F, T, S>where
    D: Distribution<T>,
    F: Fn(T) -> S,
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> S
 
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> S
Generate a random value of 
T, using rng as the source of randomness.Auto Trait Implementations§
impl<D, F, T, S> Freeze for DistMap<D, F, T, S>where
    D: Freeze,
    F: Freeze,
impl<D, F, T, S> RefUnwindSafe for DistMap<D, F, T, S>where
    D: RefUnwindSafe,
    F: RefUnwindSafe,
impl<D, F, T, S> Send for DistMap<D, F, T, S>where
    D: Send,
    F: Send,
impl<D, F, T, S> Sync for DistMap<D, F, T, S>where
    D: Sync,
    F: Sync,
impl<D, F, T, S> Unpin for DistMap<D, F, T, S>where
    D: Unpin,
    F: Unpin,
impl<D, F, T, S> UnwindSafe for DistMap<D, F, T, S>where
    D: UnwindSafe,
    F: UnwindSafe,
Blanket Implementations§
§impl<T> Any for Twhere
    T: 'static + ?Sized,
 
impl<T> Any for Twhere
    T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
    T: ?Sized,
 
impl<T> Borrow<T> for Twhere
    T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more