referrerpolicy=no-referrer-when-downgrade
sp_consensus_aura::digests

Trait CompatibleDigestItem

Source
pub trait CompatibleDigestItem<Signature>: Sized {
    // Required methods
    fn aura_seal(signature: Signature) -> Self;
    fn as_aura_seal(&self) -> Option<Signature>;
    fn aura_pre_digest(slot: Slot) -> Self;
    fn as_aura_pre_digest(&self) -> Option<Slot>;
}
Expand description

A digest item which is usable with aura consensus.

Required Methods§

Source

fn aura_seal(signature: Signature) -> Self

Construct a digest item which contains a signature on the hash.

Source

fn as_aura_seal(&self) -> Option<Signature>

If this item is an Aura seal, return the signature.

Source

fn aura_pre_digest(slot: Slot) -> Self

Construct a digest item which contains the slot number

Source

fn as_aura_pre_digest(&self) -> Option<Slot>

If this item is an AuRa pre-digest, return the slot number

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.

Implementations on Foreign Types§

Source§

impl<Signature> CompatibleDigestItem<Signature> for DigestItem
where Signature: Codec,

Source§

fn aura_seal(signature: Signature) -> Self

Source§

fn as_aura_seal(&self) -> Option<Signature>

Source§

fn aura_pre_digest(slot: Slot) -> Self

Source§

fn as_aura_pre_digest(&self) -> Option<Slot>

Implementors§