pub trait HeaderLike {
// Required methods
fn block(self) -> Option<BlockHeader>;
fn block_number_or_timestamp(self) -> u64;
}Expand description
A trait representing a minimal interface for types that behave like a block header.
This abstraction allows working with either full block headers (BlockHeader)
or simplified structures that only provide a timestamp (e.g., for RFQ logic).
Required Methods§
fn block(self) -> Option<BlockHeader>
fn block_number_or_timestamp(self) -> u64
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".