[][src]Struct zebra_chain::types::BlockHeight

pub struct BlockHeight(pub u32);

A u32 which represents a block height value.


Users should not construct block heights greater than BlockHeight::MAX.


impl BlockHeight[src]

pub const MIN: BlockHeight[src]

The minimum BlockHeight.

Due to the underlying type, it is impossible to construct block heights less than BlockHeight::MIN.

Style note: Sometimes, BlockHeight::MIN is less readable than BlockHeight(0). Use whichever makes sense in context.

pub const MAX: BlockHeight[src]

The maximum BlockHeight.

Users should not construct block heights greater than BlockHeight::MAX.

pub const MAX_AS_U32: u32[src]

The maximum BlockHeight as a u32, for range patterns.

BlockHeight::MAX.0 can't be used in match range patterns, use this alias instead.

Trait Implementations

impl Clone for BlockHeight[src]

impl Copy for BlockHeight[src]

impl Debug for BlockHeight[src]

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

impl Eq for BlockHeight[src]

impl FromStr for BlockHeight[src]

type Err = SerializationError

The associated error which can be returned from parsing.

impl Hash for BlockHeight[src]

impl Ord for BlockHeight[src]

impl PartialEq<BlockHeight> for BlockHeight[src]

impl PartialOrd<BlockHeight> for BlockHeight[src]

impl Serialize for BlockHeight[src]

impl StructuralEq for BlockHeight[src]

impl StructuralPartialEq for BlockHeight[src]

Auto Trait Implementations

impl RefUnwindSafe for BlockHeight

impl Send for BlockHeight

impl Sync for BlockHeight

impl Unpin for BlockHeight

impl UnwindSafe for BlockHeight

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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>,