pub struct NetWorthByTokensItem {
pub amount: String,
pub chain: String,
pub decimals: i32,
pub logo_uri: Option<String>,
pub name: String,
pub price_in_native: String,
pub price_in_usd: String,
pub symbol: String,
pub token_address: String,
pub value_in_native: String,
pub value_in_usd: String,
}Expand description
Single token net-worth item (mirrors TS WalletNetWorthItemDTO).
JSON schema
{
"description": "Single token net-worth item (mirrors TS WalletNetWorthItemDTO).",
"type": "object",
"required": [
"amount",
"chain",
"decimals",
"name",
"priceInNative",
"priceInUsd",
"symbol",
"tokenAddress",
"valueInNative",
"valueInUsd"
],
"properties": {
"amount": {
"description": "ENTITY.NET_WORTH_BY_TOKENS_ITEM.AMOUNT",
"examples": [
"1000.50"
],
"type": "string"
},
"chain": {
"description": "ENTITY.NET_WORTH_BY_TOKENS_ITEM.CHAIN",
"examples": [
"sol"
],
"type": "string"
},
"decimals": {
"description": "ENTITY.NET_WORTH_BY_TOKENS_ITEM.DECIMALS",
"examples": [
6
],
"type": "integer",
"format": "int32"
},
"logoUri": {
"description": "ENTITY.NET_WORTH_BY_TOKENS_ITEM.LOGO_URI",
"examples": [
"https://s1.chainstream.io/tokens/images/usdc.webp"
],
"type": "string"
},
"name": {
"description": "ENTITY.NET_WORTH_BY_TOKENS_ITEM.NAME",
"examples": [
"USD Coin"
],
"type": "string"
},
"priceInNative": {
"description": "ENTITY.NET_WORTH_BY_TOKENS_ITEM.PRICE_IN_NATIVE",
"examples": [
"0.00000667"
],
"type": "string"
},
"priceInUsd": {
"description": "ENTITY.NET_WORTH_BY_TOKENS_ITEM.PRICE_IN_USD",
"examples": [
"1.0001"
],
"type": "string"
},
"symbol": {
"description": "ENTITY.NET_WORTH_BY_TOKENS_ITEM.SYMBOL",
"examples": [
"USDC"
],
"type": "string"
},
"tokenAddress": {
"description": "ENTITY.NET_WORTH_BY_TOKENS_ITEM.TOKEN_ADDRESS",
"examples": [
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
],
"type": "string"
},
"valueInNative": {
"description": "ENTITY.NET_WORTH_BY_TOKENS_ITEM.VALUE_IN_NATIVE",
"examples": [
"6.67"
],
"type": "string"
},
"valueInUsd": {
"description": "ENTITY.NET_WORTH_BY_TOKENS_ITEM.VALUE_IN_USD",
"examples": [
"1000.60"
],
"type": "string"
}
}
}Fields§
§amount: StringENTITY.NET_WORTH_BY_TOKENS_ITEM.AMOUNT
chain: StringENTITY.NET_WORTH_BY_TOKENS_ITEM.CHAIN
decimals: i32ENTITY.NET_WORTH_BY_TOKENS_ITEM.DECIMALS
logo_uri: Option<String>ENTITY.NET_WORTH_BY_TOKENS_ITEM.LOGO_URI
name: StringENTITY.NET_WORTH_BY_TOKENS_ITEM.NAME
price_in_native: StringENTITY.NET_WORTH_BY_TOKENS_ITEM.PRICE_IN_NATIVE
price_in_usd: StringENTITY.NET_WORTH_BY_TOKENS_ITEM.PRICE_IN_USD
symbol: StringENTITY.NET_WORTH_BY_TOKENS_ITEM.SYMBOL
token_address: StringENTITY.NET_WORTH_BY_TOKENS_ITEM.TOKEN_ADDRESS
value_in_native: StringENTITY.NET_WORTH_BY_TOKENS_ITEM.VALUE_IN_NATIVE
value_in_usd: StringENTITY.NET_WORTH_BY_TOKENS_ITEM.VALUE_IN_USD
Implementations§
Source§impl NetWorthByTokensItem
impl NetWorthByTokensItem
pub fn builder() -> NetWorthByTokensItem
Trait Implementations§
Source§impl Clone for NetWorthByTokensItem
impl Clone for NetWorthByTokensItem
Source§fn clone(&self) -> NetWorthByTokensItem
fn clone(&self) -> NetWorthByTokensItem
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 NetWorthByTokensItem
impl Debug for NetWorthByTokensItem
Source§impl<'de> Deserialize<'de> for NetWorthByTokensItem
impl<'de> Deserialize<'de> for NetWorthByTokensItem
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<&NetWorthByTokensItem> for NetWorthByTokensItem
impl From<&NetWorthByTokensItem> for NetWorthByTokensItem
Source§fn from(value: &NetWorthByTokensItem) -> Self
fn from(value: &NetWorthByTokensItem) -> Self
Converts to this type from the input type.
Source§impl From<NetWorthByTokensItem> for NetWorthByTokensItem
impl From<NetWorthByTokensItem> for NetWorthByTokensItem
Source§fn from(value: NetWorthByTokensItem) -> Self
fn from(value: NetWorthByTokensItem) -> Self
Converts to this type from the input type.
Source§impl Serialize for NetWorthByTokensItem
impl Serialize for NetWorthByTokensItem
Source§impl TryFrom<NetWorthByTokensItem> for NetWorthByTokensItem
impl TryFrom<NetWorthByTokensItem> for NetWorthByTokensItem
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: NetWorthByTokensItem) -> Result<Self, ConversionError>
fn try_from(value: NetWorthByTokensItem) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for NetWorthByTokensItem
impl RefUnwindSafe for NetWorthByTokensItem
impl Send for NetWorthByTokensItem
impl Sync for NetWorthByTokensItem
impl Unpin for NetWorthByTokensItem
impl UnsafeUnpin for NetWorthByTokensItem
impl UnwindSafe for NetWorthByTokensItem
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