[][src]Struct grin_core::core::transaction::NRDRelativeHeight

pub struct NRDRelativeHeight(_);

Relative height field on NRD kernel variant. u16 representing a height between 1 and MAX (consensus::WEEK_HEIGHT).

Implementations

impl NRDRelativeHeight[src]

pub fn new(height: u64) -> Result<Self, Error>[src]

Create a new NRDRelativeHeight from the provided height. Checks height is valid (between 1 and WEEK_HEIGHT inclusive).

Trait Implementations

impl Clone for NRDRelativeHeight[src]

impl Copy for NRDRelativeHeight[src]

impl Debug for NRDRelativeHeight[src]

impl DefaultHashable for NRDRelativeHeight[src]

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

impl From<NRDRelativeHeight> for u64[src]

impl PartialEq<NRDRelativeHeight> for NRDRelativeHeight[src]

impl Readable for NRDRelativeHeight[src]

impl Serialize for NRDRelativeHeight[src]

impl StructuralPartialEq for NRDRelativeHeight[src]

impl TryFrom<u16> for NRDRelativeHeight[src]

Conversion from a u16 to a valid NRDRelativeHeight. Valid height is between 1 and WEEK_HEIGHT inclusive.

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<u64> for NRDRelativeHeight[src]

type Error = Error

The type returned in the event of a conversion error.

impl Writeable for NRDRelativeHeight[src]

Auto Trait Implementations

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> CloneAny for T where
    T: Clone + Any

impl<T> DebugAny for T where
    T: Any + Debug

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

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

impl<D> Hashed for D where
    D: DefaultHashable
[src]

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

impl<T> PMMRIndexHashable for T where
    T: DefaultHashable
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<H> ShortIdentifiable for H where
    H: Hashed
[src]

fn short_id(&Self, &Hash, u64) -> ShortId[src]

Generate a short_id via the following -

  • extract k0/k1 from block_hash hashed with the nonce (first two u64 values) * initialize a siphasher24 with k0/k1
    • self.hash() passing in the siphasher24 instance
    • drop the 2 most significant bytes (to return a 6 byte short_id)

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<T> UnsafeAny for T where
    T: Any