pub enum Asset {
BTC(Network),
SOL(Network),
Dodge(Network),
ETH(EthNetwork),
Unknown(String),
}
Expand description
A collection of common asset symbols for convenience
use fireblocks_sdk::Client;
use fireblocks_sdk::{ASSET_SOL, Asset};
async fn asset(client: Client) -> anyhow::Result<()> {
let response = client.create_asset("0", ASSET_SOL ).await?;
// same call but with string arg: let (response, request_id) = client.create_address(0, "SOL" ).await?;
println!("{response:#?}");
// create a new sh*tcoin
assert_eq!("sh*tcoin", Asset::new("sh*tcoin").to_string());
Ok(())
}
Variants§
Implementations§
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>,
Deserialize this value from the given Serde deserializer. Read more
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 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key
and return true
if they are equal.