pub trait AssetBehavior {
Show 15 methods
// Required methods
fn new(code: &str, issuer: Option<&str>) -> Result<Self, String>
where Self: Sized;
fn from_operation(asset_xdr: Asset) -> Result<Self, String>
where Self: Sized;
fn to_xdr_object(&self) -> Asset;
fn to_change_trust_xdr_object(&self) -> ChangeTrustAsset;
fn to_trust_line_xdr_object(&self) -> TrustLineAsset;
fn ascii_compare(a: &str, b: &str) -> i32;
fn native() -> Self
where Self: Sized;
fn is_native(&self) -> bool;
fn compare(asset_a: &Self, asset_b: &Self) -> i32
where Self: Sized;
fn get_asset_type(&self) -> String;
fn get_raw_asset_type(&self) -> Result<AssetType, String>;
fn equals(&self, asset: &Self) -> bool;
fn get_code(&self) -> Option<String>;
fn get_issuer(&self) -> Option<String>;
fn to_string_asset(&self) -> String;
}
Required Methods§
fn new(code: &str, issuer: Option<&str>) -> Result<Self, String>where
Self: Sized,
fn from_operation(asset_xdr: Asset) -> Result<Self, String>where
Self: Sized,
fn to_xdr_object(&self) -> Asset
fn to_change_trust_xdr_object(&self) -> ChangeTrustAsset
fn to_trust_line_xdr_object(&self) -> TrustLineAsset
fn ascii_compare(a: &str, b: &str) -> i32
fn native() -> Selfwhere
Self: Sized,
fn is_native(&self) -> bool
fn compare(asset_a: &Self, asset_b: &Self) -> i32where
Self: Sized,
fn get_asset_type(&self) -> String
fn get_raw_asset_type(&self) -> Result<AssetType, String>
fn equals(&self, asset: &Self) -> bool
fn get_code(&self) -> Option<String>
fn get_issuer(&self) -> Option<String>
fn to_string_asset(&self) -> String
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.