pub struct Reservoir<T> { /* private fields */ }Expand description
Reservoir sampler using Algorithm R.
Maintains a fixed-size sample of items seen so far, with each item having equal probability of being in the sample.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Reservoir<T>
impl<T> RefUnwindSafe for Reservoir<T>where
T: RefUnwindSafe,
impl<T> Send for Reservoir<T>where
T: Send,
impl<T> Sync for Reservoir<T>where
T: Sync,
impl<T> Unpin for Reservoir<T>where
T: Unpin,
impl<T> UnwindSafe for Reservoir<T>where
T: UnwindSafe,
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