Trait reth::core::rpc::api::NetApiClient

source ·
pub trait NetApiClient: ClientT {
    // Provided methods
    fn version<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn peer_count<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<PeerCount, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn is_listening<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
}
Expand description

Client implementation for the NetApi RPC API.

Provided Methods§

source

fn version<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Returns the network ID.

source

fn peer_count<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<PeerCount, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Returns number of peers connected to node.

source

fn is_listening<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Returns true if client is actively listening for network connections. Otherwise false.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<TypeJsonRpseeInteral> NetApiClient for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: ClientT,