[−][src]Struct grin_core::core::transaction::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]
fn clone(&self) -> NRDRelativeHeight
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for NRDRelativeHeight
[src]
impl Debug for NRDRelativeHeight
[src]
impl DefaultHashable for NRDRelativeHeight
[src]
impl<'de> Deserialize<'de> for NRDRelativeHeight
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl From<NRDRelativeHeight> for u64
[src]
fn from(height: NRDRelativeHeight) -> Self
[src]
impl PartialEq<NRDRelativeHeight> for NRDRelativeHeight
[src]
fn eq(&self, other: &NRDRelativeHeight) -> bool
[src]
fn ne(&self, other: &NRDRelativeHeight) -> bool
[src]
impl Readable for NRDRelativeHeight
[src]
impl Serialize for NRDRelativeHeight
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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.
fn try_from(height: u16) -> Result<Self, Self::Error>
[src]
impl TryFrom<u64> for NRDRelativeHeight
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(height: u64) -> Result<Self, Self::Error>
[src]
impl Writeable for NRDRelativeHeight
[src]
Auto Trait Implementations
impl RefUnwindSafe for NRDRelativeHeight
impl Send for NRDRelativeHeight
impl Sync for NRDRelativeHeight
impl Unpin for NRDRelativeHeight
impl UnwindSafe for NRDRelativeHeight
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Sync + Send> where
T: Send + Sync,
T: Send + Sync,
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
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<D> Hashed for D where
D: DefaultHashable,
[src]
D: DefaultHashable,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> PMMRIndexHashable for T where
T: DefaultHashable,
[src]
T: DefaultHashable,
fn hash_with_index(&Self, u64) -> Hash
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<H> ShortIdentifiable for H where
H: Hashed,
[src]
H: Hashed,
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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,