pub trait OnChainStorageRO {
// Required methods
fn block_header(&self, block_hash: H256) -> Option<BlockHeader>;
fn block_events(&self, block_hash: H256) -> Option<Vec<BlockEvent>>;
fn code_blob_info(&self, code_id: CodeId) -> Option<CodeBlobInfo>;
fn block_synced(&self, block_hash: H256) -> bool;
fn validators(&self, era_index: u64) -> Option<ValidatorsVec>;
// Provided method
fn block_simple_data(&self, block_hash: H256) -> Option<SimpleBlockData> { ... }
}Required Methods§
fn block_header(&self, block_hash: H256) -> Option<BlockHeader>
fn block_events(&self, block_hash: H256) -> Option<Vec<BlockEvent>>
fn code_blob_info(&self, code_id: CodeId) -> Option<CodeBlobInfo>
fn block_synced(&self, block_hash: H256) -> bool
fn validators(&self, era_index: u64) -> Option<ValidatorsVec>
Provided Methods§
fn block_simple_data(&self, block_hash: H256) -> Option<SimpleBlockData>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".