pub struct Imr(/* private fields */);Expand description
Identity Merkle Root
A Merkle root that commits to a node’s combinator, its witness data (if present),
and recursively its children. Used as input to the Ihr type which is probably
actually what you want.
Implementations§
Source§impl Imr
impl Imr
Sourcepub const fn from_byte_array(data: [u8; 32]) -> Self
pub const fn from_byte_array(data: [u8; 32]) -> Self
Converts the given tagged hash into a byte array
Sourcepub const fn to_byte_array(self) -> [u8; 32]
pub const fn to_byte_array(self) -> [u8; 32]
Converts the given tagged hash into a byte array
Sourcepub const fn as_byte_array(&self) -> &[u8; 32]
pub const fn as_byte_array(&self) -> &[u8; 32]
Converts the given tagged hash into a byte array
Source§impl Imr
impl Imr
Sourcepub fn disconnect(left: Self, right: Self) -> Self
pub fn disconnect(left: Self, right: Self) -> Self
Produce a CMR for a disconnect combinator
Sourcepub fn witness(ty: &FinalArrow, value: &Value) -> Self
pub fn witness(ty: &FinalArrow, value: &Value) -> Self
Produce a CMR for a witness combinator
Sourcepub fn fail(entropy: FailEntropy) -> Self
pub fn fail(entropy: FailEntropy) -> Self
Produce an IHR for a fail combinator
Sourcepub fn const_word(word: &Word) -> Self
pub fn const_word(word: &Word) -> Self
Compute the CMR of a constant word jet
This is equal to the IHR of the equivalent scribe, converted to a CMR in the usual way for jets.
Trait Implementations§
impl Copy for Imr
impl Eq for Imr
Source§impl Ord for Imr
impl Ord for Imr
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Imr
impl PartialOrd for Imr
impl StructuralPartialEq for Imr
Auto Trait Implementations§
impl Freeze for Imr
impl RefUnwindSafe for Imr
impl Send for Imr
impl Sync for Imr
impl Unpin for Imr
impl UnsafeUnpin for Imr
impl UnwindSafe for Imr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more