pub struct BalanceQuery { /* private fields */ }Expand description
Query builder for getting account balance.
§Example
let near = Near::testnet().build();
// Simple query
let balance = near.balance("alice.testnet").await?;
// Query at specific block
let balance = near.balance("alice.testnet")
.at_block(100_000_000)
.await?;
// Query with specific finality
let balance = near.balance("alice.testnet")
.finality(Finality::Optimistic)
.await?;Implementations§
Source§impl BalanceQuery
impl BalanceQuery
Sourcepub fn at_block_hash(self, hash: CryptoHash) -> Self
pub fn at_block_hash(self, hash: CryptoHash) -> Self
Query at a specific block hash.
Trait Implementations§
Source§impl IntoFuture for BalanceQuery
impl IntoFuture for BalanceQuery
Source§type Output = Result<AccountBalance, Error>
type Output = Result<AccountBalance, Error>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <BalanceQuery as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <BalanceQuery as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl Freeze for BalanceQuery
impl !RefUnwindSafe for BalanceQuery
impl Send for BalanceQuery
impl Sync for BalanceQuery
impl Unpin for BalanceQuery
impl UnsafeUnpin for BalanceQuery
impl !UnwindSafe for BalanceQuery
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