Trait reth::rpc::api::clients::AdminApiClient

source ·
pub trait AdminApiClient: SubscriptionClientT {
    // Provided methods
    fn add_peer<'life0, 'async_trait>(
        &'life0 self,
        record: NodeRecord,
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn remove_peer<'life0, 'async_trait>(
        &'life0 self,
        record: AnyNode,
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn add_trusted_peer<'life0, 'async_trait>(
        &'life0 self,
        record: AnyNode,
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn remove_trusted_peer<'life0, 'async_trait>(
        &'life0 self,
        record: AnyNode,
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn peers<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<PeerInfo>, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn node_info<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<NodeInfo, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn subscribe_peer_events<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Subscription<String>, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Sync + 'async_trait { ... }
}
Available on crate feature client only.
Expand description

Client implementation for the AdminApi RPC API.

Provided Methods§

source

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

Adds the given node record to the peerset.

source

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

Disconnects from a remote node if the connection exists.

Returns true if the peer was successfully removed.

source

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

Adds the given node record to the trusted peerset.

source

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

Removes a remote node from the trusted peer set, but it does not disconnect it automatically.

Returns true if the peer was successfully removed.

source

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

The peers administrative property can be queried for all the information known about the connected remote nodes at the networking granularity. These include general information about the nodes themselves as participants of the devp2p P2P overlay protocol, as well as specialized information added by each of the running application protocols

source

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

Returns the ENR of the node.

source

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

Creates an RPC subscription which serves events received from the network.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<TypeJsonRpseeInteral> AdminApiClient for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: SubscriptionClientT,