ArbApiServer

Trait ArbApiServer 

Source
pub trait ArbApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn maintenance_status(&self) -> RpcResult<ArbMaintenanceStatus>;
    fn check_publisher_health(&self) -> RpcResult<()>;
    fn get_block_info<'life0, 'async_trait>(
        &'life0 self,
        block_num: u64,
    ) -> Pin<Box<dyn Future<Output = RpcResult<ArbBlockInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

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

Server trait implementation for the ArbApi RPC API.

Required Methods§

Source

fn maintenance_status(&self) -> RpcResult<ArbMaintenanceStatus>

Returns the maintenance status of the node.

Source

fn check_publisher_health(&self) -> RpcResult<()>

Checks publisher health. Returns an error if unhealthy.

Source

fn get_block_info<'life0, 'async_trait>( &'life0 self, block_num: u64, ) -> Pin<Box<dyn Future<Output = RpcResult<ArbBlockInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns block info for the given block number.

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<Provider> ArbApiServer for ArbApiHandler<Provider>
where Provider: BlockNumReader + BlockReaderIdExt + HeaderProvider + 'static,