pub struct Cmr(/* private fields */);Expand description
Commitment Merkle root
A Merkle root that commits to a node’s combinator and recursively its children.
Importantly, witness data and right disconnect branches are not included in the hash. This makes these elements malleable while preserving program identity (SegWit, delegation).
Uniquely identifies a program’s structure in terms of combinators at commitment time.
Implementations§
Source§impl Cmr
impl Cmr
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 Cmr
impl Cmr
Sourcepub fn disconnect(left: Cmr) -> Self
pub fn disconnect(left: Cmr) -> Self
Produce a CMR for a disconnect combinator
Sourcepub fn fail(entropy: FailEntropy) -> Self
pub fn fail(entropy: FailEntropy) -> Self
Produce a CMR 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 Cmr
impl Eq for Cmr
Source§impl Ord for Cmr
impl Ord for Cmr
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 Cmr
impl PartialOrd for Cmr
impl StructuralPartialEq for Cmr
Auto Trait Implementations§
impl Freeze for Cmr
impl RefUnwindSafe for Cmr
impl Send for Cmr
impl Sync for Cmr
impl Unpin for Cmr
impl UnsafeUnpin for Cmr
impl UnwindSafe for Cmr
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