ibc_testkit::hosts

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.

Object Safety§

This trait is not object safe.

Implementors§