pub struct StakeDiceState {
pub state_hash: String,
pub stake_toncoin_amount: i64,
pub suggested_stake_toncoin_amounts: Vec<i64>,
pub current_streak: i32,
pub prize_per_mille: Vec<i32>,
pub streak_prize_per_mille: i32,
}Expand description
Describes state of the stake dice
Fields§
§state_hash: StringHash of the state to use for sending the next dice; may be empty if the stake dice can’t be sent by the current user
stake_toncoin_amount: i64The Toncoin amount that was staked in the previous roll; in the smallest units of the currency
suggested_stake_toncoin_amounts: Vec<i64>The amounts of Toncoins that are suggested to be staked; in the smallest units of the currency
current_streak: i32The number of rolled sixes towards the streak; 0-2
prize_per_mille: Vec<i32>The number of Toncoins received by the user for each 1000 Toncoins staked if the dice outcome is 1-6 correspondingly; may be empty if the stake dice can’t be sent by the current user
streak_prize_per_mille: i32The number of Toncoins received by the user for each 1000 Toncoins staked if the dice outcome is 6 three times in a row with the same stake
Trait Implementations§
Source§impl Clone for StakeDiceState
impl Clone for StakeDiceState
Source§fn clone(&self) -> StakeDiceState
fn clone(&self) -> StakeDiceState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StakeDiceState
impl Debug for StakeDiceState
Source§impl Default for StakeDiceState
impl Default for StakeDiceState
Source§fn default() -> StakeDiceState
fn default() -> StakeDiceState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StakeDiceState
impl<'de> Deserialize<'de> for StakeDiceState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StakeDiceState
impl PartialEq for StakeDiceState
Source§impl Serialize for StakeDiceState
impl Serialize for StakeDiceState
impl StructuralPartialEq for StakeDiceState
Auto Trait Implementations§
impl Freeze for StakeDiceState
impl RefUnwindSafe for StakeDiceState
impl Send for StakeDiceState
impl Sync for StakeDiceState
impl Unpin for StakeDiceState
impl UnsafeUnpin for StakeDiceState
impl UnwindSafe for StakeDiceState
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