pub trait OpP2PApiServer:
Sized
+ Send
+ Sync
+ 'static {
Show 17 methods
// Required methods
fn opp2p_self<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<PeerInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<PeerDump>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_peer_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<PeerStats>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_discovery_table<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_block_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_list_blocked_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_block_addr<'life0, 'async_trait>(
&'life0 self,
ip: IpAddr,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_unblock_addr<'life0, 'async_trait>(
&'life0 self,
ip: IpAddr,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_list_blocked_addrs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<IpAddr>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_block_subnet<'life0, 'async_trait>(
&'life0 self,
subnet: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_unblock_subnet<'life0, 'async_trait>(
&'life0 self,
subnet: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_list_blocked_subnets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_protect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_unprotect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_connect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn opp2p_disconnect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}
Available on crate feature
jsonrpsee
only.Expand description
Server trait implementation for the OpP2PApi
RPC API.
Required Methods§
Sourcefn opp2p_self<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<PeerInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_self<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<PeerInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns information of node
Sourcefn opp2p_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<PeerDump>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<PeerDump>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns information of peers
Sourcefn opp2p_peer_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<PeerStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_peer_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<PeerStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns statistics of peers
Sourcefn opp2p_discovery_table<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_discovery_table<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the discovery table
Sourcefn opp2p_block_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_block_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Blocks the given peer
Sourcefn opp2p_list_blocked_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_list_blocked_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists blocked peers
Sourcefn opp2p_block_addr<'life0, 'async_trait>(
&'life0 self,
ip: IpAddr,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_block_addr<'life0, 'async_trait>(
&'life0 self,
ip: IpAddr,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Blocks the given address
Sourcefn opp2p_unblock_addr<'life0, 'async_trait>(
&'life0 self,
ip: IpAddr,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_unblock_addr<'life0, 'async_trait>(
&'life0 self,
ip: IpAddr,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Unblocks the given address
Sourcefn opp2p_list_blocked_addrs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<IpAddr>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_list_blocked_addrs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<IpAddr>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists blocked addresses
Sourcefn opp2p_block_subnet<'life0, 'async_trait>(
&'life0 self,
subnet: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_block_subnet<'life0, 'async_trait>(
&'life0 self,
subnet: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Blocks the given subnet
Sourcefn opp2p_unblock_subnet<'life0, 'async_trait>(
&'life0 self,
subnet: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_unblock_subnet<'life0, 'async_trait>(
&'life0 self,
subnet: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Unblocks the given subnet
Sourcefn opp2p_list_blocked_subnets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_list_blocked_subnets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists blocked subnets
Sourcefn opp2p_protect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_protect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Protects the given peer
Sourcefn opp2p_unprotect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn opp2p_unprotect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Unprotects the given peer
Provided Methods§
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.