pub struct GetBalance(pub f64);
Available on crate feature
26_2
and non-crate feature 27_0
only.Expand description
Result of the JSON-RPC method getbalance
.
getbalance ( “(dummy)” minconf include_watchonly )
Returns the total available balance. The available balance is what the wallet considers currently spendable, and is thus affected by options which limit spendability such as -spendzeroconfchange.
Arguments:
- (dummy) (string, optional) Remains for backward compatibility. Must be excluded or set to “*”.
- minconf (numeric, optional, default=0) Only include transactions confirmed at least this many times.
- include_watchonly (bool, optional, default=false) Also include balance in watch-only addresses (see ‘importaddress’)
Tuple Fields§
§0: f64
Implementations§
Source§impl GetBalance
impl GetBalance
Sourcepub fn into_model(self) -> Result<GetBalance, ParseAmountError>
pub fn into_model(self) -> Result<GetBalance, ParseAmountError>
Converts version specific type to a version in-specific, more strongly typed type.
Sourcepub fn balance(self) -> Result<Amount, ParseAmountError>
pub fn balance(self) -> Result<Amount, ParseAmountError>
Converts json straight to a bitcoin::Amount
.
Trait Implementations§
Source§impl Clone for GetBalance
impl Clone for GetBalance
Source§fn clone(&self) -> GetBalance
fn clone(&self) -> GetBalance
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 GetBalance
impl Debug for GetBalance
Source§impl<'de> Deserialize<'de> for GetBalance
impl<'de> Deserialize<'de> for GetBalance
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetBalance, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetBalance, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GetBalance
impl PartialEq for GetBalance
Source§impl Serialize for GetBalance
impl Serialize for GetBalance
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for GetBalance
Auto Trait Implementations§
impl Freeze for GetBalance
impl RefUnwindSafe for GetBalance
impl Send for GetBalance
impl Sync for GetBalance
impl Unpin for GetBalance
impl UnwindSafe for GetBalance
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§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