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 { ... }
}
Expand description
Client implementation for the AdminApi
RPC API.
Provided Methods§
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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
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.