pub struct Delegation(pub AccountId);Tuple Fields§
§0: AccountIdImplementations§
source§impl Delegation
impl Delegation
pub fn view_staked_balance( &self, pool: AccountId, ) -> Result<RpcBuilder<PostprocessHandler<NearToken, CallResultHandler<u128>>, RpcQueryRequest, BlockReference>, BuilderError>
pub fn view_unstaked_balance( &self, pool: AccountId, ) -> Result<RpcBuilder<PostprocessHandler<NearToken, CallResultHandler<u128>>, RpcQueryRequest, BlockReference>, BuilderError>
pub fn view_total_balance( &self, pool: AccountId, ) -> Result<RpcBuilder<PostprocessHandler<NearToken, CallResultHandler<u128>>, RpcQueryRequest, BlockReference>, BuilderError>
pub fn view_balance( &self, pool: AccountId, ) -> Result<MultiRpcBuilder<PostprocessHandler<UserStakeBalance, MultiQueryHandler<(CallResultHandler<u128>, CallResultHandler<u128>, CallResultHandler<u128>)>>, RpcQueryRequest, BlockReference>, BuilderError>
pub fn is_account_unstaked_balance_available_for_withdrawal( &self, pool: AccountId, ) -> Result<RpcBuilder<CallResultHandler<bool>, RpcQueryRequest, BlockReference>, BuilderError>
pub fn deposit( &self, pool: AccountId, amount: NearToken, ) -> Result<ConstructTransaction, BuilderError>
pub fn deposit_and_stake( &self, pool: AccountId, amount: NearToken, ) -> Result<ConstructTransaction, BuilderError>
pub fn stake( &self, pool: AccountId, amount: NearToken, ) -> Result<ConstructTransaction, BuilderError>
pub fn stake_all( &self, pool: AccountId, ) -> Result<ConstructTransaction, BuilderError>
pub fn unstake( &self, pool: AccountId, amount: NearToken, ) -> Result<ConstructTransaction, BuilderError>
pub fn unstake_all( &self, pool: AccountId, ) -> Result<ConstructTransaction, BuilderError>
pub fn withdraw( &self, pool: AccountId, amount: NearToken, ) -> Result<ConstructTransaction, BuilderError>
pub fn withdraw_all( &self, pool: AccountId, ) -> Result<ConstructTransaction, BuilderError>
Trait Implementations§
source§impl Clone for Delegation
impl Clone for Delegation
source§fn clone(&self) -> Delegation
fn clone(&self) -> Delegation
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for Delegation
impl RefUnwindSafe for Delegation
impl Send for Delegation
impl Sync for Delegation
impl Unpin for Delegation
impl UnwindSafe for Delegation
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more