pub struct UserStakeBalance {
pub staked: NearToken,
pub unstaked: NearToken,
pub total: NearToken,
}Expand description
The total user balance on a pool contract
The type is related to the StakingPool smart contract.
Fields§
§staked: NearTokenThe balance that currently is staked. The user can’t withdraw this balance until unstake is called
and withdraw period is over.
unstaked: NearTokenThe balance that is not staked. The user can start withdrawing this balance. Some pools have a withdraw period.
total: NearTokenThe total balance of the user on a contract (staked + unstaked)
Trait Implementations§
Source§impl Clone for UserStakeBalance
impl Clone for UserStakeBalance
Source§fn clone(&self) -> UserStakeBalance
fn clone(&self) -> UserStakeBalance
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 UserStakeBalance
impl Debug for UserStakeBalance
Source§impl Default for UserStakeBalance
impl Default for UserStakeBalance
Source§fn default() -> UserStakeBalance
fn default() -> UserStakeBalance
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UserStakeBalance
impl<'de> Deserialize<'de> for UserStakeBalance
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 UserStakeBalance
impl PartialEq for UserStakeBalance
Source§impl Serialize for UserStakeBalance
impl Serialize for UserStakeBalance
impl Eq for UserStakeBalance
impl StructuralPartialEq for UserStakeBalance
Auto Trait Implementations§
impl Freeze for UserStakeBalance
impl RefUnwindSafe for UserStakeBalance
impl Send for UserStakeBalance
impl Sync for UserStakeBalance
impl Unpin for UserStakeBalance
impl UnwindSafe for UserStakeBalance
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