Struct solana_evm_loader_program::scope::evm::secp256k1::rand::distributions::WeightedChoice [−][src]
👎 Deprecated since 0.6.0:
use WeightedIndex instead
A distribution that selects from a finite collection of weighted items.
Deprecated: use WeightedIndex
instead.
Implementations
impl<'a, T> WeightedChoice<'a, T> where
T: Clone,
[src]
T: Clone,
pub fn new(items: &'a mut [Weighted<T>]) -> WeightedChoice<'a, T>
[src]
👎 Deprecated since 0.6.0:
use WeightedIndex instead
Create a new WeightedChoice
.
Panics if:
items
is empty- the total weight is 0
- the total weight is larger than a
u32
can contain.
Trait Implementations
impl<'a, T> Debug for WeightedChoice<'a, T> where
T: 'a + Debug,
[src]
T: 'a + Debug,
impl<'a, T> Distribution<T> for WeightedChoice<'a, T> where
T: Clone,
[src]
T: Clone,
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for WeightedChoice<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> Send for WeightedChoice<'a, T> where
T: Send,
T: Send,
impl<'a, T> Sync for WeightedChoice<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for WeightedChoice<'a, T>
impl<'a, T> !UnwindSafe for WeightedChoice<'a, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,