[][src]Struct types::slot_height::SlotHeight

pub struct SlotHeight(_);

Beacon block height, effectively Slot/GENESIS_START_BLOCK.

Methods

impl SlotHeight[src]

pub fn as_u64(&self) -> u64[src]

impl SlotHeight[src]

pub fn as_usize(&self) -> usize[src]

impl SlotHeight[src]

pub fn saturating_sub<T: Into<SlotHeight>>(&self, other: T) -> SlotHeight[src]

pub fn saturating_add<T: Into<SlotHeight>>(&self, other: T) -> SlotHeight[src]

pub fn checked_div<T: Into<SlotHeight>>(&self, rhs: T) -> Option<SlotHeight>[src]

pub fn is_power_of_two(&self) -> bool[src]

impl SlotHeight[src]

pub fn new(slot: u64) -> SlotHeight[src]

pub fn slot(self, genesis_slot: Slot) -> Slot[src]

pub fn epoch(self, genesis_slot: u64, slots_per_epoch: u64) -> Epoch[src]

pub fn max_value() -> SlotHeight[src]

Trait Implementations

impl TestRandom for SlotHeight[src]

impl Into<u64> for SlotHeight[src]

impl Into<usize> for SlotHeight[src]

impl Eq for SlotHeight[src]

impl Default for SlotHeight[src]

impl Clone for SlotHeight[src]

impl PartialOrd<SlotHeight> for SlotHeight[src]

fn partial_cmp(&self, other: &SlotHeight) -> Option<Ordering>[src]

Utilizes partial_cmp on the underlying u64.

impl PartialOrd<u64> for SlotHeight[src]

fn partial_cmp(&self, other: &u64) -> Option<Ordering>[src]

Utilizes partial_cmp on the underlying u64.

impl PartialEq<SlotHeight> for SlotHeight[src]

impl PartialEq<u64> for SlotHeight[src]

impl Ord for SlotHeight[src]

impl From<u64> for SlotHeight[src]

impl From<usize> for SlotHeight[src]

impl Copy for SlotHeight[src]

impl Hash for SlotHeight[src]

impl Add<SlotHeight> for SlotHeight[src]

type Output = SlotHeight

The resulting type after applying the + operator.

impl Add<u64> for SlotHeight[src]

type Output = SlotHeight

The resulting type after applying the + operator.

impl Sub<SlotHeight> for SlotHeight[src]

type Output = SlotHeight

The resulting type after applying the - operator.

impl Sub<u64> for SlotHeight[src]

type Output = SlotHeight

The resulting type after applying the - operator.

impl Mul<SlotHeight> for SlotHeight[src]

type Output = SlotHeight

The resulting type after applying the * operator.

impl Mul<u64> for SlotHeight[src]

type Output = SlotHeight

The resulting type after applying the * operator.

impl Div<SlotHeight> for SlotHeight[src]

type Output = SlotHeight

The resulting type after applying the / operator.

impl Div<u64> for SlotHeight[src]

type Output = SlotHeight

The resulting type after applying the / operator.

impl Rem<SlotHeight> for SlotHeight[src]

type Output = SlotHeight

The resulting type after applying the % operator.

impl Rem<u64> for SlotHeight[src]

type Output = SlotHeight

The resulting type after applying the % operator.

impl AddAssign<SlotHeight> for SlotHeight[src]

impl AddAssign<u64> for SlotHeight[src]

impl SubAssign<SlotHeight> for SlotHeight[src]

impl SubAssign<u64> for SlotHeight[src]

impl MulAssign<SlotHeight> for SlotHeight[src]

impl MulAssign<u64> for SlotHeight[src]

impl DivAssign<SlotHeight> for SlotHeight[src]

impl DivAssign<u64> for SlotHeight[src]

impl Debug for SlotHeight[src]

impl Display for SlotHeight[src]

impl TreeHash for SlotHeight[src]

impl Serialize for SlotHeight[src]

impl Decode for SlotHeight[src]

impl Encode for SlotHeight[src]

impl Value for SlotHeight[src]

Auto Trait Implementations

impl Send for SlotHeight

impl Unpin for SlotHeight

impl Sync for SlotHeight

impl UnwindSafe for SlotHeight

impl RefUnwindSafe for SlotHeight

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized