pub struct WeightedIndex<W: Weight> { /* private fields */ }๐Deprecated since 0.8.0:
moved to rand_distr crate
Implementationsยง
Sourceยงimpl<W: Weight> WeightedIndex<W>
impl<W: Weight> WeightedIndex<W>
pub fn new(_weights: Vec<W>) -> Result<Self, WeightedError>
๐Deprecated since 0.8.0:
moved to rand_distr crate
Trait Implementationsยง
Auto Trait Implementationsยง
impl<W> Freeze for WeightedIndex<W>where
PhantomData<W>: Freeze,
impl<W> RefUnwindSafe for WeightedIndex<W>where
PhantomData<W>: RefUnwindSafe,
impl<W> Send for WeightedIndex<W>where
PhantomData<W>: Send,
impl<W> Sync for WeightedIndex<W>where
PhantomData<W>: Sync,
impl<W> Unpin for WeightedIndex<W>where
PhantomData<W>: Unpin,
impl<W> UnsafeUnpin for WeightedIndex<W>where
PhantomData<W>: UnsafeUnpin,
impl<W> UnwindSafe for WeightedIndex<W>where
PhantomData<W>: 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