[][src]Struct terraswap::Asset

pub struct Asset {
    pub info: AssetInfo,
    pub amount: Uint128,
}

Fields

info: AssetInfoamount: Uint128

Implementations

impl Asset[src]

pub fn is_native_token(&self) -> bool[src]

pub fn compute_tax<S: Storage, A: Api, Q: Querier>(
    &self,
    deps: &Extern<S, A, Q>
) -> StdResult<Uint128>
[src]

pub fn deduct_tax<S: Storage, A: Api, Q: Querier>(
    &self,
    deps: &Extern<S, A, Q>
) -> StdResult<Coin>
[src]

pub fn into_msg<S: Storage, A: Api, Q: Querier>(
    self,
    deps: &Extern<S, A, Q>,
    sender: HumanAddr,
    recipient: HumanAddr
) -> StdResult<CosmosMsg>
[src]

pub fn assert_sent_native_token_balance(&self, env: &Env) -> StdResult<()>[src]

pub fn to_raw<S: Storage, A: Api, Q: Querier>(
    &self,
    deps: &Extern<S, A, Q>
) -> StdResult<AssetRaw>
[src]

Trait Implementations

impl Clone for Asset[src]

impl Debug for Asset[src]

impl<'de> Deserialize<'de> for Asset[src]

impl Display for Asset[src]

impl JsonSchema for Asset[src]

impl PartialEq<Asset> for Asset[src]

impl Serialize for Asset[src]

impl StructuralPartialEq for Asset[src]

Auto Trait Implementations

impl RefUnwindSafe for Asset

impl Send for Asset

impl Sync for Asset

impl Unpin for Asset

impl UnwindSafe for Asset

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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> ToString for T where
    T: Display + ?Sized
[src]

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.