pub struct WalletBalance {
pub main_balance: Option<String>,
pub pending: Option<String>,
pub currency: Option<String>,
}Expand description
Wallet balance information.
Fields§
§main_balance: Option<String>§pending: Option<String>§currency: Option<String>Implementations§
Source§impl WalletBalance
impl WalletBalance
Sourcepub fn parse_main_balance(&self) -> Option<f64>
pub fn parse_main_balance(&self) -> Option<f64>
Parse main_balance into a float.
Expects VNĐ format ("35.016,48₫" or "132.500₫").
Returns None if the field is absent or unparseable.
Sourcepub fn parse_pending(&self) -> Option<f64>
pub fn parse_pending(&self) -> Option<f64>
Parse pending into a float.
Trait Implementations§
Source§impl Clone for WalletBalance
impl Clone for WalletBalance
Source§fn clone(&self) -> WalletBalance
fn clone(&self) -> WalletBalance
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WalletBalance
impl Debug for WalletBalance
Source§impl<'de> Deserialize<'de> for WalletBalance
impl<'de> Deserialize<'de> for WalletBalance
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
Auto Trait Implementations§
impl Freeze for WalletBalance
impl RefUnwindSafe for WalletBalance
impl Send for WalletBalance
impl Sync for WalletBalance
impl Unpin for WalletBalance
impl UnsafeUnpin for WalletBalance
impl UnwindSafe for WalletBalance
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> 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