[][src]Struct rpick::LotteryChoice

pub struct LotteryChoice {
    pub name: String,
    pub tickets: u64,
    pub weight: u64,
}

Represents an individual choice for the lottery model.

Attributes

  • name - The name of the choice.
  • tickets - The current number of tickets the choice has.
  • weight - The number of tickets that will be added to tickets each time this choice is not picked.

Fields

name: Stringtickets: u64weight: u64

Trait Implementations

impl Debug for LotteryChoice[src]

impl<'de> Deserialize<'de> for LotteryChoice[src]

impl PartialEq<LotteryChoice> for LotteryChoice[src]

impl Serialize for LotteryChoice[src]

impl StructuralPartialEq for LotteryChoice[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,