pub struct BatchResponse {
pub balances: HashMap<String, Balance>,
pub utxos: HashMap<String, Vec<Utxo>>,
pub histories: HashMap<String, Vec<TxHistory>>,
pub transactions: HashMap<String, String>,
}Expand description
Response from a batch request.
Fields§
§balances: HashMap<String, Balance>Balance results by address
utxos: HashMap<String, Vec<Utxo>>UTXO results by address
histories: HashMap<String, Vec<TxHistory>>History results by address
transactions: HashMap<String, String>Transaction results by txid
Implementations§
Source§impl BatchResponse
impl BatchResponse
Sourcepub fn get_balance(&self, address: &str) -> Option<&Balance>
pub fn get_balance(&self, address: &str) -> Option<&Balance>
Get balance for an address.
Sourcepub fn get_history(&self, address: &str) -> Option<&[TxHistory]>
pub fn get_history(&self, address: &str) -> Option<&[TxHistory]>
Get history for an address.
Sourcepub fn get_transaction(&self, txid: &str) -> Option<&str>
pub fn get_transaction(&self, txid: &str) -> Option<&str>
Get a transaction by txid.
Sourcepub fn total_confirmed(&self) -> u64
pub fn total_confirmed(&self) -> u64
Get total confirmed balance across all addresses.
Sourcepub fn total_unconfirmed(&self) -> i64
pub fn total_unconfirmed(&self) -> i64
Get total unconfirmed balance across all addresses.
Sourcepub fn total_utxo_value(&self) -> u64
pub fn total_utxo_value(&self) -> u64
Get total UTXO value across all addresses.
Sourcepub fn funded_addresses(&self) -> Vec<&str>
pub fn funded_addresses(&self) -> Vec<&str>
Get addresses with non-zero balance.
Sourcepub fn has_any_balance(&self) -> bool
pub fn has_any_balance(&self) -> bool
Check if any address has balance.
Trait Implementations§
Source§impl Clone for BatchResponse
impl Clone for BatchResponse
Source§fn clone(&self) -> BatchResponse
fn clone(&self) -> BatchResponse
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 BatchResponse
impl Debug for BatchResponse
Source§impl Default for BatchResponse
impl Default for BatchResponse
Source§fn default() -> BatchResponse
fn default() -> BatchResponse
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BatchResponse
impl RefUnwindSafe for BatchResponse
impl Send for BatchResponse
impl Sync for BatchResponse
impl Unpin for BatchResponse
impl UnwindSafe for BatchResponse
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