pub struct Balance {
pub confirmed: u64,
pub unconfirmed: i64,
}Expand description
Balance information for an address.
Fields§
§confirmed: u64Confirmed balance in satoshis
unconfirmed: i64Unconfirmed balance in satoshis (can be negative when spending)
Implementations§
Source§impl Balance
impl Balance
Sourcepub fn total(&self) -> i64
pub fn total(&self) -> i64
Returns the total balance (confirmed + unconfirmed). Note: This can be less than confirmed if there are unconfirmed spends.
Sourcepub fn has_balance(&self) -> bool
pub fn has_balance(&self) -> bool
Returns true if the address has any balance (confirmed or unconfirmed).
Sourcepub fn has_unconfirmed(&self) -> bool
pub fn has_unconfirmed(&self) -> bool
Returns true if there are unconfirmed transactions.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Balance
impl<'de> Deserialize<'de> for Balance
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
impl Eq for Balance
impl StructuralPartialEq for Balance
Auto Trait Implementations§
impl Freeze for Balance
impl RefUnwindSafe for Balance
impl Send for Balance
impl Sync for Balance
impl Unpin for Balance
impl UnwindSafe for Balance
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