pub struct DexPoolTokenSnapshot {
pub amount_in_native: String,
pub amount_in_usd: String,
pub decimals: i32,
pub price_native: String,
pub price_usd: String,
pub token_address: String,
pub vault_amount: String,
}Expand description
DEX pool token snapshot
JSON schema
{
"description": "DEX pool token snapshot",
"type": "object",
"required": [
"amountInNative",
"amountInUsd",
"decimals",
"priceNative",
"priceUsd",
"tokenAddress",
"vaultAmount"
],
"properties": {
"amountInNative": {
"description": "Amount in native token",
"examples": [
"5000.123"
],
"type": "string"
},
"amountInUsd": {
"description": "Amount in USD",
"examples": [
"1000000.45"
],
"type": "string"
},
"decimals": {
"description": "Token decimals",
"examples": [
6
],
"type": "integer",
"format": "int32"
},
"priceNative": {
"description": "Price in native token",
"examples": [
"0.005"
],
"type": "string"
},
"priceUsd": {
"description": "Price in USD",
"examples": [
"1.0001"
],
"type": "string"
},
"tokenAddress": {
"description": "Token address",
"examples": [
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
],
"type": "string"
},
"vaultAmount": {
"description": "Vault amount",
"examples": [
"1000000000000"
],
"type": "string"
}
}
}Fields§
§amount_in_native: StringAmount in native token
amount_in_usd: StringAmount in USD
decimals: i32Token decimals
price_native: StringPrice in native token
price_usd: StringPrice in USD
token_address: StringToken address
vault_amount: StringVault amount
Implementations§
Source§impl DexPoolTokenSnapshot
impl DexPoolTokenSnapshot
pub fn builder() -> DexPoolTokenSnapshot
Trait Implementations§
Source§impl Clone for DexPoolTokenSnapshot
impl Clone for DexPoolTokenSnapshot
Source§fn clone(&self) -> DexPoolTokenSnapshot
fn clone(&self) -> DexPoolTokenSnapshot
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 DexPoolTokenSnapshot
impl Debug for DexPoolTokenSnapshot
Source§impl<'de> Deserialize<'de> for DexPoolTokenSnapshot
impl<'de> Deserialize<'de> for DexPoolTokenSnapshot
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<&DexPoolTokenSnapshot> for DexPoolTokenSnapshot
impl From<&DexPoolTokenSnapshot> for DexPoolTokenSnapshot
Source§fn from(value: &DexPoolTokenSnapshot) -> Self
fn from(value: &DexPoolTokenSnapshot) -> Self
Converts to this type from the input type.
Source§impl From<DexPoolTokenSnapshot> for DexPoolTokenSnapshot
impl From<DexPoolTokenSnapshot> for DexPoolTokenSnapshot
Source§fn from(value: DexPoolTokenSnapshot) -> Self
fn from(value: DexPoolTokenSnapshot) -> Self
Converts to this type from the input type.
Source§impl Serialize for DexPoolTokenSnapshot
impl Serialize for DexPoolTokenSnapshot
Source§impl TryFrom<DexPoolTokenSnapshot> for DexPoolTokenSnapshot
impl TryFrom<DexPoolTokenSnapshot> for DexPoolTokenSnapshot
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: DexPoolTokenSnapshot) -> Result<Self, ConversionError>
fn try_from(value: DexPoolTokenSnapshot) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for DexPoolTokenSnapshot
impl RefUnwindSafe for DexPoolTokenSnapshot
impl Send for DexPoolTokenSnapshot
impl Sync for DexPoolTokenSnapshot
impl Unpin for DexPoolTokenSnapshot
impl UnsafeUnpin for DexPoolTokenSnapshot
impl UnwindSafe for DexPoolTokenSnapshot
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