pub trait ClientBlockImportExt<Block>: Sizedwhere
Block: Block,{
// Required methods
fn import<'life0, 'async_trait>(
&'life0 self,
origin: BlockOrigin,
block: Block,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn import_as_best<'life0, 'async_trait>(
&'life0 self,
origin: BlockOrigin,
block: Block,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn import_as_final<'life0, 'async_trait>(
&'life0 self,
origin: BlockOrigin,
block: Block,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn import_justified<'life0, 'async_trait>(
&'life0 self,
origin: BlockOrigin,
block: Block,
justifications: Justifications,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Extension trait for a test client around block importing.
Required Methods§
Sourcefn import<'life0, 'async_trait>(
&'life0 self,
origin: BlockOrigin,
block: Block,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn import<'life0, 'async_trait>(
&'life0 self,
origin: BlockOrigin,
block: Block,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Import block to the chain. No finality.
Sourcefn import_as_best<'life0, 'async_trait>(
&'life0 self,
origin: BlockOrigin,
block: Block,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn import_as_best<'life0, 'async_trait>(
&'life0 self,
origin: BlockOrigin,
block: Block,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Import a block and make it our best block if possible.
Sourcefn import_as_final<'life0, 'async_trait>(
&'life0 self,
origin: BlockOrigin,
block: Block,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn import_as_final<'life0, 'async_trait>(
&'life0 self,
origin: BlockOrigin,
block: Block,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Import a block and finalize it.
Sourcefn import_justified<'life0, 'async_trait>(
&'life0 self,
origin: BlockOrigin,
block: Block,
justifications: Justifications,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn import_justified<'life0, 'async_trait>(
&'life0 self,
origin: BlockOrigin,
block: Block,
justifications: Justifications,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Import block with justification(s), finalizes block.
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.
Implementations on Foreign Types§
Source§impl<Block, T> ClientBlockImportExt<Block> for Arc<T>
impl<Block, T> ClientBlockImportExt<Block> for Arc<T>
This implementation is required, because of the weird api requirements around BlockImport
.