Trait TestHeader

Source
pub trait TestHeader:
    Clone
    + Debug
    + Into<Any> {
    type ConsensusState: ConsensusState + Into<AnyConsensusState> + From<Self> + Clone + Debug;

    // Required methods
    fn height(&self) -> Height;
    fn timestamp(&self) -> Timestamp;

    // Provided method
    fn into_consensus_state(self) -> Self::ConsensusState { ... }
}
Expand description

TestHeader is a trait that defines the interface for a header submitted by relayer from the host blockchain.

Required Associated Types§

Source

type ConsensusState: ConsensusState + Into<AnyConsensusState> + From<Self> + Clone + Debug

The type of consensus state can be extracted from the header.

Required Methods§

Source

fn height(&self) -> Height

The height of the block, as recorded in the header.

Source

fn timestamp(&self) -> Timestamp

The timestamp of the block, as recorded in the header.

Provided Methods§

Source

fn into_consensus_state(self) -> Self::ConsensusState

Extract the consensus state from the header.

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§