[−][src]Enum cw0::Expiration
Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)
Variants
AtHeight(u64)
AtHeight will expire when env.block.height
>= height
AtTime(u64)
AtTime will expire when env.block.time
>= time
Never will never expire. Used to express the empty variant
Fields of Never
Implementations
impl Expiration
[src]
pub fn is_expired(&self, block: &BlockInfo) -> bool
[src]
Trait Implementations
impl Add<Duration> for Expiration
[src]
type Output = StdResult<Expiration>
The resulting type after applying the +
operator.
pub fn add(self, duration: Duration) -> StdResult<Expiration>
[src]
impl Clone for Expiration
[src]
pub fn clone(&self) -> Expiration
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy 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]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for Expiration
[src]
impl JsonSchema for Expiration
[src]
pub fn schema_name() -> String
[src]
pub fn json_schema(gen: &mut SchemaGenerator) -> Schema
[src]
pub fn is_referenceable() -> bool
[src]
impl PartialEq<Expiration> for Expiration
[src]
pub fn eq(&self, other: &Expiration) -> bool
[src]
pub fn ne(&self, other: &Expiration) -> bool
[src]
impl PartialOrd<Expiration> for Expiration
[src]
pub fn partial_cmp(&self, other: &Expiration) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for Expiration
[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Expiration
[src]
Auto Trait Implementations
impl RefUnwindSafe for Expiration
[src]
impl Send for Expiration
[src]
impl Sync for Expiration
[src]
impl Unpin for Expiration
[src]
impl UnwindSafe for Expiration
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,