pub trait ChainInfoWrite<Block>: ChainInfo<Block>where
Block: GenericOwnedBlock,{
// Required methods
fn persist_block(
&self,
block: Block,
block_details: BlockDetails,
) -> impl Future<Output = Result<(), PersistBlockError>> + Send;
fn persist_segment_headers(
&self,
segment_headers: Vec<SegmentHeader>,
) -> impl Future<Output = Result<(), PersistSegmentHeadersError>> + Send;
}Expand description
ChainInfo extension for writing information
Required Methods§
Sourcefn persist_block(
&self,
block: Block,
block_details: BlockDetails,
) -> impl Future<Output = Result<(), PersistBlockError>> + Send
fn persist_block( &self, block: Block, block_details: BlockDetails, ) -> impl Future<Output = Result<(), PersistBlockError>> + Send
Persist newly imported block
Sourcefn persist_segment_headers(
&self,
segment_headers: Vec<SegmentHeader>,
) -> impl Future<Output = Result<(), PersistSegmentHeadersError>> + Send
fn persist_segment_headers( &self, segment_headers: Vec<SegmentHeader>, ) -> impl Future<Output = Result<(), PersistSegmentHeadersError>> + Send
Persist segment headers.
Multiple can be inserted for efficiency purposes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".