pub struct Asset {
pub code: String,
pub issuer: Option<String>,
}
Fields§
§code: String
§issuer: Option<String>
Trait Implementations§
Source§impl AssetBehavior for Asset
impl AssetBehavior for Asset
fn new(code: &str, issuer: Option<&str>) -> Result<Asset, String>
fn from_operation(asset_xdr: Asset) -> Result<Asset, String>
fn to_trust_line_xdr_object(&self) -> TrustLineAsset
fn to_change_trust_xdr_object(&self) -> ChangeTrustAsset
fn to_xdr_object(&self) -> Asset
fn ascii_compare(a: &str, b: &str) -> i32
fn native() -> Asset
fn is_native(&self) -> bool
fn compare(asset_a: &Asset, asset_b: &Asset) -> i32
fn get_asset_type(&self) -> String
fn get_raw_asset_type(&self) -> Result<AssetType, String>
fn equals(&self, asset: &Asset) -> bool
fn get_code(&self) -> Option<String>
fn get_issuer(&self) -> Option<String>
fn to_string_asset(&self) -> String
Source§impl From<&Asset> for ChangeTrustAsset
impl From<&Asset> for ChangeTrustAsset
Source§fn from(value: &Asset) -> ChangeTrustAsset
fn from(value: &Asset) -> ChangeTrustAsset
Converts to this type from the input type.
Source§impl From<&Asset> for TrustLineAsset
impl From<&Asset> for TrustLineAsset
Source§fn from(value: &Asset) -> TrustLineAsset
fn from(value: &Asset) -> TrustLineAsset
Converts to this type from the input type.
Source§impl From<Asset> for ChangeTrustAsset
impl From<Asset> for ChangeTrustAsset
Source§fn from(value: Asset) -> ChangeTrustAsset
fn from(value: Asset) -> ChangeTrustAsset
Converts to this type from the input type.
Source§impl From<Asset> for TrustLineAsset
impl From<Asset> for TrustLineAsset
Source§fn from(value: Asset) -> TrustLineAsset
fn from(value: Asset) -> TrustLineAsset
Converts to this type from the input type.
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.