[][src]Enum cw20::Expiration

pub enum Expiration {
    AtHeight {
        height: u64,
    },
    AtTime {
        time: u64,
    },
    Never {},
}

Variants

AtHeight

AtHeight will expire when env.block.height >= height

Fields of AtHeight

height: u64
AtTime

AtTime will expire when env.block.time >= time

Fields of AtTime

time: u64
Never

Never will never expire. Used to distinguish None from Some(Expiration::Never)

Fields of Never

Implementations

impl Expiration[src]

pub fn is_expired(&self, block: &BlockInfo) -> bool[src]

Trait Implementations

impl Clone for Expiration[src]

impl Debug for Expiration[src]

impl Default for Expiration[src]

The default (empty value) is to never expire

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

impl JsonSchema for Expiration[src]

impl PartialEq<Expiration> for Expiration[src]

impl Serialize for Expiration[src]

impl StructuralPartialEq for Expiration[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> 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, 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.