pub trait BlockIdTo<Block: Block> {
type Error: Error;
// Required methods
fn to_hash(
&self,
block_id: &BlockId<Block>,
) -> Result<Option<Block::Hash>, Self::Error>;
fn to_number(
&self,
block_id: &BlockId<Block>,
) -> Result<Option<NumberFor<Block>>, Self::Error>;
}Expand description
Something that can convert a BlockId to a number or a hash.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".