fc_rpc

Trait DebugApiServer

Source
pub trait DebugApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn raw_header<'life0, 'async_trait>(
        &'life0 self,
        number: BlockNumberOrHash,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn raw_block<'life0, 'async_trait>(
        &'life0 self,
        number: BlockNumberOrHash,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn raw_transaction<'life0, 'async_trait>(
        &'life0 self,
        hash: H256,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn raw_receipts<'life0, 'async_trait>(
        &'life0 self,
        number: BlockNumberOrHash,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn bad_blocks(
        &self,
        number: BlockNumberOrHash,
    ) -> Result<Vec<()>, ErrorObject<'static>>;

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

Server trait implementation for the DebugApi RPC API.

Required Methods§

Source

fn raw_header<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrHash, ) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns an RLP-encoded header with the given number or hash.

Source

fn raw_block<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrHash, ) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns an RLP-encoded block with the given number or hash.

Source

fn raw_transaction<'life0, 'async_trait>( &'life0 self, hash: H256, ) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns a EIP-2718 binary-encoded transaction with the given hash.

Source

fn raw_receipts<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrHash, ) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns an array of EIP-2718 binary-encoded receipts with the given number of hash.

Source

fn bad_blocks( &self, number: BlockNumberOrHash, ) -> Result<Vec<()>, ErrorObject<'static>>

Returns an array of recent bad blocks that the client has seen on the network.

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, BE> DebugApiServer for Debug<B, C, BE>
where B: BlockT, C: ProvideRuntimeApi<B> + HeaderBackend<B> + StorageProvider<B, BE> + 'static, C::Api: EthereumRuntimeRPCApi<B>, BE: Backend<B> + 'static,