[−][src]Enum cw0::Duration
Duration is a delta of time. You can add it to a BlockInfo or Expiration to move that further in the future. Note that an height-based Duration and a time-based Expiration cannot be combined
Variants
Height(u64)
Time(u64)
Implementations
impl Duration
[src]
pub fn after(&self, block: &BlockInfo) -> Expiration
[src]
Create an expiration for Duration after current block
pub fn plus_one(&self) -> Duration
[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 Add<Duration> for Duration
[src]
type Output = StdResult<Duration>
The resulting type after applying the +
operator.
pub fn add(self, rhs: Duration) -> StdResult<Duration>
[src]
impl Clone for Duration
[src]
impl Copy for Duration
[src]
impl Debug for Duration
[src]
impl<'de> Deserialize<'de> for Duration
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for Duration
[src]
impl JsonSchema for Duration
[src]
pub fn schema_name() -> String
[src]
pub fn json_schema(gen: &mut SchemaGenerator) -> Schema
[src]
pub fn is_referenceable() -> bool
[src]
impl Mul<u64> for Duration
[src]
type Output = Duration
The resulting type after applying the *
operator.
pub fn mul(self, rhs: u64) -> Self::Output
[src]
impl PartialEq<Duration> for Duration
[src]
impl Serialize for Duration
[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Duration
[src]
Auto Trait Implementations
impl RefUnwindSafe for Duration
[src]
impl Send for Duration
[src]
impl Sync for Duration
[src]
impl Unpin for Duration
[src]
impl UnwindSafe for Duration
[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>,