referrerpolicy=no-referrer-when-downgrade

Trait BabeApiServer

Source
pub trait BabeApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required method
    fn epoch_authorship<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ext: &'life1 Extensions,
    ) -> Pin<Box<dyn Future<Output = Result<HashMap<AuthorityId, EpochAuthorship>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the BabeApi RPC API.

Required Methods§

Source

fn epoch_authorship<'life0, 'life1, 'async_trait>( &'life0 self, ext: &'life1 Extensions, ) -> Pin<Box<dyn Future<Output = Result<HashMap<AuthorityId, EpochAuthorship>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore.

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

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<B, C, SC> BabeApiServer for Babe<B, C, SC>
where B: BlockT, C: ProvideRuntimeApi<B> + HeaderBackend<B> + HeaderMetadata<B, Error = Error> + 'static, C::Api: BabeRuntimeApi<B>, SC: SelectChain<B> + Clone + 'static,