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).
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.