[][src]Enum zebra_chain::types::LockTime

pub enum LockTime {
    Height(BlockHeight),
    Time(DateTime<Utc>),
}

A Bitcoin-style locktime, representing either a block height or an epoch time.

Invariants

Users should not construct a LockTime with:

Variants

Height(BlockHeight)

Unlock at a particular block height.

Time(DateTime<Utc>)

Unlock at a particular time.

Implementations

impl LockTime[src]

pub const MIN_TIMESTAMP: i64[src]

The minimum LockTime::Time, as a timestamp in seconds.

Users should not construct lock times less than MIN_TIMESTAMP.

pub const MAX_TIMESTAMP: i64[src]

The maximum LockTime::Time, as a timestamp in seconds.

Users should not construct lock times greater than MAX_TIMESTAMP. LockTime is u32 in the spec, so times are limited to u32::MAX.

pub fn min_lock_time() -> LockTime[src]

Returns the minimum LockTime::Time, as a LockTime.

Users should not construct lock times less than min_lock_timestamp.

pub fn max_lock_time() -> LockTime[src]

Returns the maximum LockTime::Time, as a LockTime.

Users should not construct lock times greater than max_lock_timestamp.

Trait Implementations

impl Clone for LockTime[src]

impl Copy for LockTime[src]

impl Debug for LockTime[src]

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

impl Eq for LockTime[src]

impl PartialEq<LockTime> for LockTime[src]

impl Serialize for LockTime[src]

impl StructuralEq for LockTime[src]

impl StructuralPartialEq for LockTime[src]

impl ZcashDeserialize for LockTime[src]

impl ZcashSerialize for LockTime[src]

Auto Trait Implementations

impl RefUnwindSafe for LockTime

impl Send for LockTime

impl Sync for LockTime

impl Unpin for LockTime

impl UnwindSafe for LockTime

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> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,