iota_json_rpc_api

Trait BridgeReadApiServer

Source
pub trait BridgeReadApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn get_latest_bridge<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = RpcResult<BridgeSummary>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_bridge_object_initial_shared_version<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = RpcResult<u64>> + 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 BridgeReadApi RPC API.

Required Methods§

Source

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

Returns the latest BridgeSummary

Source

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

Returns the initial shared version of the bridge object, usually for the purpose of constructing an ObjectArg in a transaction.

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§