[][src]Enum stellar_base::asset::CreditAsset

pub enum CreditAsset {
    AlphaNum4 {
        code: String,
        issuer: PublicKey,
    },
    AlphaNum12 {
        code: String,
        issuer: PublicKey,
    },
}

A non-native asset, identified by asset code/issuer id.

Variants

AlphaNum4

Fields of AlphaNum4

code: Stringissuer: PublicKey
AlphaNum12

Fields of AlphaNum12

code: Stringissuer: PublicKey

Implementations

impl CreditAsset[src]

pub fn new(code: String, issuer: PublicKey) -> Result<CreditAsset>[src]

Creates new credit asset with code and issuer.

Code must be shorter than 12 characters.

pub fn code(&self) -> &str[src]

Returns the asset code.

pub fn issuer(&self) -> &PublicKey[src]

Returns the asset issuer.

pub fn asset_type(&self) -> CreditAssetType[src]

Returns the credit asset type.

Trait Implementations

impl Clone for CreditAsset[src]

impl Debug for CreditAsset[src]

impl Eq for CreditAsset[src]

impl PartialEq<CreditAsset> for CreditAsset[src]

impl StructuralEq for CreditAsset[src]

impl StructuralPartialEq for CreditAsset[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.