pub struct WalletBalances {
pub chain: String,
pub native_balance: Option<String>,
pub native_balance_in_usd: Option<String>,
pub tokens: Vec<TokenBalance>,
pub total_value_in_usd: Option<String>,
pub wallet_address: String,
}Expand description
Wallet balances
JSON schema
{
"description": "Wallet balances",
"type": "object",
"required": [
"chain",
"tokens",
"walletAddress"
],
"properties": {
"chain": {
"description": "Chain identifier",
"examples": [
"sol"
],
"type": "string"
},
"nativeBalance": {
"description": "Native token balance",
"examples": [
"0.5"
],
"type": "string"
},
"nativeBalanceInUsd": {
"description": "Native balance in USD",
"examples": [
"75.00"
],
"type": "string"
},
"tokens": {
"description": "Token balances",
"type": "array",
"items": {
"$ref": "#/components/schemas/TokenBalance"
}
},
"totalValueInUsd": {
"description": "Total value in USD",
"examples": [
"3.369918"
],
"type": "string"
},
"walletAddress": {
"description": "Wallet address",
"examples": [
"8X35rQUK2u9hfn8rMPwwr6ZSEUhbmfDPEapp589XyoM1"
],
"type": "string"
}
}
}Fields§
§chain: StringChain identifier
native_balance: Option<String>Native token balance
native_balance_in_usd: Option<String>Native balance in USD
tokens: Vec<TokenBalance>Token balances
total_value_in_usd: Option<String>Total value in USD
wallet_address: StringWallet address
Implementations§
Source§impl WalletBalances
impl WalletBalances
pub fn builder() -> WalletBalances
Trait Implementations§
Source§impl Clone for WalletBalances
impl Clone for WalletBalances
Source§fn clone(&self) -> WalletBalances
fn clone(&self) -> WalletBalances
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 WalletBalances
impl Debug for WalletBalances
Source§impl<'de> Deserialize<'de> for WalletBalances
impl<'de> Deserialize<'de> for WalletBalances
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
Source§impl From<&WalletBalances> for WalletBalances
impl From<&WalletBalances> for WalletBalances
Source§fn from(value: &WalletBalances) -> Self
fn from(value: &WalletBalances) -> Self
Converts to this type from the input type.
Source§impl From<WalletBalances> for WalletBalances
impl From<WalletBalances> for WalletBalances
Source§fn from(value: WalletBalances) -> Self
fn from(value: WalletBalances) -> Self
Converts to this type from the input type.
Source§impl Serialize for WalletBalances
impl Serialize for WalletBalances
Source§impl TryFrom<WalletBalances> for WalletBalances
impl TryFrom<WalletBalances> for WalletBalances
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: WalletBalances) -> Result<Self, ConversionError>
fn try_from(value: WalletBalances) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for WalletBalances
impl RefUnwindSafe for WalletBalances
impl Send for WalletBalances
impl Sync for WalletBalances
impl Unpin for WalletBalances
impl UnsafeUnpin for WalletBalances
impl UnwindSafe for WalletBalances
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