referrerpolicy=no-referrer-when-downgrade
sc_consensus_manual_seal::rpc

Trait ManualSealApiServer

Source
pub trait ManualSealApiServer<Hash>:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn create_block<'life0, 'async_trait>(
        &'life0 self,
        create_empty: bool,
        finalize: bool,
        parent_hash: Option<Hash>,
    ) -> Pin<Box<dyn Future<Output = Result<CreatedBlock<Hash>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn finalize_block<'life0, 'async_trait>(
        &'life0 self,
        hash: Hash,
        justification: Option<EncodedJustification>,
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self>
       where Hash: Send + Sync + 'static + DeserializeOwned + Clone + Serialize { ... }
}
Expand description

Server trait implementation for the ManualSealApi RPC API.

Required Methods§

Source

fn create_block<'life0, 'async_trait>( &'life0 self, create_empty: bool, finalize: bool, parent_hash: Option<Hash>, ) -> Pin<Box<dyn Future<Output = Result<CreatedBlock<Hash>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Instructs the manual-seal authorship task to create a new block

Source

fn finalize_block<'life0, 'async_trait>( &'life0 self, hash: Hash, justification: Option<EncodedJustification>, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Instructs the manual-seal authorship task to finalize a block

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>
where Hash: Send + Sync + 'static + DeserializeOwned + Clone + Serialize,

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

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.

Implementors§

Source§

impl<Hash: Send + 'static> ManualSealApiServer<Hash> for ManualSeal<Hash>