pub trait TestBlock: Clone + Debug {
type Header: TestHeader;
// Required methods
fn height(&self) -> Height;
fn timestamp(&self) -> Timestamp;
fn into_header_with_trusted(self, trusted_block: &Self) -> Self::Header;
// Provided method
fn into_header(self) -> Self::Header { ... }
}Expand description
TestBlock is a trait that defines the interface for a block produced by a host blockchain.
Required Associated Types§
sourcetype Header: TestHeader
type Header: TestHeader
The type of header can be extracted from the block.
Required Methods§
sourcefn into_header_with_trusted(self, trusted_block: &Self) -> Self::Header
fn into_header_with_trusted(self, trusted_block: &Self) -> Self::Header
Extract the IBC header using the target and trusted blocks.
Provided Methods§
sourcefn into_header(self) -> Self::Header
fn into_header(self) -> Self::Header
Extract the IBC header only using the target block (sets the trusted block to itself).
Object Safety§
This trait is not object safe.