pub struct Choices<T> { /* private fields */ }Expand description
Struct to hold choices and pre-validated WeightedIndex
The weights need to sum up close to 1.0 and will be re-normalized if they do so.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Choices<T>
impl<T> RefUnwindSafe for Choices<T>where
T: RefUnwindSafe,
impl<T> Send for Choices<T>where
T: Send,
impl<T> Sync for Choices<T>where
T: Sync,
impl<T> Unpin for Choices<T>where
T: Unpin,
impl<T> UnwindSafe for Choices<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