pub struct Token {
pub name: String,
pub symbol: String,
pub address: String,
pub chain_id: u32,
pub decimals: u16,
pub logo_uri: Option<Url>,
pub tags: Vec<String>,
pub extensions: HashMap<String, Option<ExtensionValue>>,
}
Expand description
Metadata for a single token in a token list
Fields§
§name: String
The name of the token
symbol: String
The symbol for the token; must be alphanumeric.
address: String
The checksummed address of the token on the specified chain ID
chain_id: u32
The chain ID of the Ethereum network where this token is deployed
decimals: u16
The number of decimals for the token balance
logo_uri: Option<Url>
A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64
An array of tag identifiers associated with the token; tags are defined at the list level
extensions: HashMap<String, Option<ExtensionValue>>
An object containing any arbitrary or vendor-specific token metadata
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Token
impl<'de> Deserialize<'de> for Token
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 JsonSchema for Token
impl JsonSchema for Token
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreimpl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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