snowball 0.1.3

Generic implementation of Snowball consensus algorithm
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
/// Object that samples `sample_size` set of items from
/// the list provided.
pub trait Sampler {
    type SamplingType;
    type Error: crate::traits::error::Error;

    fn sample(
        &mut self,
        items: Vec<Self::SamplingType>,
        sample_size: u64,
    ) -> Result<Vec<Self::SamplingType>, Self::Error>;
}