[][src]Trait weighted_rs::Weight

pub trait Weight {
    type Item;
    fn next(&mut self) -> Option<Self::Item>;
fn add(&mut self, item: Self::Item, weight: isize);
fn all(&self) -> HashMap<Self::Item, isize>;
fn remove_all(&mut self);
fn reset(&mut self); }

Associated Types

type Item

Loading content...

Required methods

fn next(&mut self) -> Option<Self::Item>

fn add(&mut self, item: Self::Item, weight: isize)

fn all(&self) -> HashMap<Self::Item, isize>

fn remove_all(&mut self)

fn reset(&mut self)

Loading content...

Implementors

impl<T: Clone + PartialEq + Eq + Hash> Weight for RandWeight<T>[src]

type Item = T

impl<T: Clone + PartialEq + Eq + Hash> Weight for RoundrobinWeight<T>[src]

type Item = T

impl<T: Clone + PartialEq + Eq + Hash> Weight for SmoothWeight<T>[src]

type Item = T

Loading content...