AssetBehavior

Trait AssetBehavior 

Source
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§

Source

fn new(code: &str, issuer: Option<&str>) -> Result<Self, String>
where Self: Sized,

Source

fn from_operation(asset_xdr: Asset) -> Result<Self, String>
where Self: Sized,

Source

fn to_xdr_object(&self) -> Asset

Source

fn to_change_trust_xdr_object(&self) -> ChangeTrustAsset

Source

fn to_trust_line_xdr_object(&self) -> TrustLineAsset

Source

fn ascii_compare(a: &str, b: &str) -> i32

Source

fn native() -> Self
where Self: Sized,

Source

fn is_native(&self) -> bool

Source

fn compare(asset_a: &Self, asset_b: &Self) -> i32
where Self: Sized,

Source

fn get_asset_type(&self) -> String

Source

fn get_raw_asset_type(&self) -> Result<AssetType, String>

Source

fn equals(&self, asset: &Self) -> bool

Source

fn get_code(&self) -> Option<String>

Source

fn get_issuer(&self) -> Option<String>

Source

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.

Implementors§