Skip to main content

CertificateValue

Trait CertificateValue 

Source
pub trait CertificateValue: Clone {
    const KIND: CertificateKind;

    // Required methods
    fn chain_id(&self) -> ChainId;
    fn epoch(&self) -> Epoch;
    fn height(&self) -> BlockHeight;
    fn required_blob_ids(&self) -> BTreeSet<BlobId>;
    fn hash(&self) -> CryptoHash;
}
Expand description

A value that can be certified by a quorum of validators.

Required Associated Constants§

Source

const KIND: CertificateKind

The kind of certificate this value produces.

Required Methods§

Source

fn chain_id(&self) -> ChainId

Returns the ID of the chain this value applies to.

Source

fn epoch(&self) -> Epoch

Returns the epoch this value belongs to.

Source

fn height(&self) -> BlockHeight

Returns the block height this value applies to.

Source

fn required_blob_ids(&self) -> BTreeSet<BlobId>

Returns the IDs of all blobs required to validate this value.

Source

fn hash(&self) -> CryptoHash

Returns the hash that uniquely identifies this value.

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§

Source§

impl CertificateValue for ConfirmedBlock

Source§

const KIND: CertificateKind = CertificateKind::Confirmed

Source§

impl CertificateValue for Timeout

Source§

const KIND: CertificateKind = CertificateKind::Timeout

Source§

impl CertificateValue for ValidatedBlock

Source§

const KIND: CertificateKind = CertificateKind::Validated