Trait Committable

Source
pub trait Committable<D: Digest>:
    Clone
    + Sized
    + Send
    + Sync
    + 'static {
    // Required method
    fn commitment(&self) -> D;
}
Expand description

An object that shares a (commitment) Digest with other, related values.

Required Methods§

Source

fn commitment(&self) -> D

Returns the unique commitment of the object as a Digest.

For simple objects (like a block), this is often just the digest of the object itself. For more complex objects, however, this may represent some root or base of a proof structure (where many unique objects map to the same commitment).

§Warning

It must not be possible for two objects with the same Digest to map to different commitments. Primitives assume there is a one-to-one relation between digest and commitment and a one-to-many relation between commitment and digest.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§