pub struct Filtered<T, D: Distribution<T> + Clone, P: Fn(&T) -> bool> {
pub d: D,
pub p: P,
pub pd: PhantomData<T>,
}Expand description
A distribution that samples from d but rejects values that do not satisfy predicate p.
Fields§
§d: D§p: P§pd: PhantomData<T>Trait Implementations§
Source§impl<T: Clone, D: Clone + Distribution<T> + Clone, P: Clone + Fn(&T) -> bool> Clone for Filtered<T, D, P>
impl<T: Clone, D: Clone + Distribution<T> + Clone, P: Clone + Fn(&T) -> bool> Clone for Filtered<T, D, P>
Source§impl<T, D: Distribution<T> + Clone, P: Fn(&T) -> bool> Distribution<T> for Filtered<T, D, P>
impl<T, D: Distribution<T> + Clone, P: Fn(&T) -> bool> Distribution<T> for Filtered<T, D, P>
Auto Trait Implementations§
impl<T, D, P> Freeze for Filtered<T, D, P>
impl<T, D, P> RefUnwindSafe for Filtered<T, D, P>
impl<T, D, P> Send for Filtered<T, D, P>
impl<T, D, P> Sync for Filtered<T, D, P>
impl<T, D, P> Unpin for Filtered<T, D, P>
impl<T, D, P> UnwindSafe for Filtered<T, D, P>
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