Enum shuttle_core::Asset
[−]
[src]
pub enum Asset { Native, Credit(CreditAsset), }
Enum representing an asset.
Variants
Native
The native asset (XLM).
Credit(CreditAsset)
A non-native asset, identified by asset code/issuer id.
Methods
impl Asset
[src]
fn native() -> Asset
[src]
Create the native asset: Lumens.
fn credit<S>(code: S, issuer: PublicKey) -> Result<Asset> where
S: Into<String>,
[src]
S: Into<String>,
Create the asset with code
issued by issuer
.
Trait Implementations
impl Debug for Asset
[src]
impl Clone for Asset
[src]
fn clone(&self) -> Asset
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Asset
[src]
fn eq(&self, __arg_0: &Asset) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Asset) -> bool
[src]
This method tests for !=
.
impl Eq for Asset
[src]
impl ToXdr<Asset> for Asset
[src]
fn to_xdr(&self) -> Result<Asset>
[src]
Build the object that can be serialized to XDR.
fn to_writer<W: Write>(&self, w: &mut W) -> Result<()>
[src]
Serialize to the writer w
.
fn to_base64(&self) -> Result<String>
[src]
Serialize to base64.