Trait Auxiliary

Source
pub trait Auxiliary<B: Block>: Clone {
    type Key: Clone + Eq + Hash;

    // Required method
    fn key(&self) -> Self::Key;

    // Provided method
    fn associated(&self) -> Vec<B::Identifier> { ... }
}
Expand description

A value where the key is contained in.

Required Associated Types§

Source

type Key: Clone + Eq + Hash

Key type

Required Methods§

Source

fn key(&self) -> Self::Key

Return the key of this object.

Provided Methods§

Source

fn associated(&self) -> Vec<B::Identifier>

Return block ids associated with this auxiliary. If the backend removes any of the blocks listed here, it is expected to remove this auxiliary entry, and trigger a recalculation for the consensus engine.

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<B: Block> Auxiliary<B> for ()

Source§

type Key = ()

Source§

fn key(&self)

Implementors§