#[non_exhaustive]pub struct Asset {Show 14 fields
pub asset_type: String,
pub address: Option<String>,
pub name: String,
pub symbol: String,
pub image: String,
pub decimals: i64,
pub aliased: Option<bool>,
pub buy_tax: Option<u16>,
pub sell_tax: Option<u16>,
pub description: Option<String>,
pub discovery: Option<String>,
pub legacy_bridge: Option<bool>,
pub source: Option<AssetSource>,
pub token_page: Option<TokenPage>,
}Expand description
Raw metadata for an asset listed by DeDust.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.asset_type: StringUpstream asset kind, such as native or jetton.
address: Option<String>Friendly TON jetton-master address; absent for the native asset.
name: StringDisplay name supplied by DeDust.
symbol: StringDisplay symbol supplied by DeDust.
image: StringAbsolute asset-image URL.
decimals: i64Number of decimal places used by the asset.
aliased: Option<bool>Raw alias flag supplied by DeDust.
buy_tax: Option<u16>Raw buy-tax value supplied by DeDust.
sell_tax: Option<u16>Raw sell-tax value supplied by DeDust.
description: Option<String>Optional upstream description value, currently used for media URLs.
discovery: Option<String>Optional friendly TON address used for DeDust discovery metadata.
legacy_bridge: Option<bool>Whether the asset originated from the legacy TON bridge.
source: Option<AssetSource>Optional source-chain and bridge metadata.
token_page: Option<TokenPage>Optional content shown on the DeDust token page.
Implementations§
Source§impl Asset
impl Asset
Sourcepub fn with_asset_type(self, value: String) -> Self
pub fn with_asset_type(self, value: String) -> Self
Sets the asset_type field of this struct.
Sourcepub fn with_address(self, value: String) -> Self
pub fn with_address(self, value: String) -> Self
Sets the address field of this struct.
Sourcepub fn with_symbol(self, value: String) -> Self
pub fn with_symbol(self, value: String) -> Self
Sets the symbol field of this struct.
Sourcepub fn with_image(self, value: String) -> Self
pub fn with_image(self, value: String) -> Self
Sets the image field of this struct.
Sourcepub fn with_decimals(self, value: i64) -> Self
pub fn with_decimals(self, value: i64) -> Self
Sets the decimals field of this struct.
Sourcepub fn with_aliased(self, value: bool) -> Self
pub fn with_aliased(self, value: bool) -> Self
Sets the aliased field of this struct.
Sourcepub fn with_buy_tax(self, value: u16) -> Self
pub fn with_buy_tax(self, value: u16) -> Self
Sets the buy_tax field of this struct.
Sourcepub fn with_sell_tax(self, value: u16) -> Self
pub fn with_sell_tax(self, value: u16) -> Self
Sets the sell_tax field of this struct.
Sourcepub fn with_description(self, value: String) -> Self
pub fn with_description(self, value: String) -> Self
Sets the description field of this struct.
Sourcepub fn with_discovery(self, value: String) -> Self
pub fn with_discovery(self, value: String) -> Self
Sets the discovery field of this struct.
Sourcepub fn with_legacy_bridge(self, value: bool) -> Self
pub fn with_legacy_bridge(self, value: bool) -> Self
Sets the legacy_bridge field of this struct.
Sourcepub fn with_source(self, value: AssetSource) -> Self
pub fn with_source(self, value: AssetSource) -> Self
Sets the source field of this struct.
Sourcepub fn with_token_page(self, value: TokenPage) -> Self
pub fn with_token_page(self, value: TokenPage) -> Self
Sets the token_page field of this struct.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Asset
impl<'de> Deserialize<'de> for Asset
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>,
impl Eq for Asset
impl StructuralPartialEq for Asset
Auto Trait Implementations§
impl Freeze for Asset
impl RefUnwindSafe for Asset
impl Send for Asset
impl Sync for Asset
impl Unpin for Asset
impl UnsafeUnpin for Asset
impl UnwindSafe for Asset
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.