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> { ... }
}
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
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,
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,
todo: should be IPNet?
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,
todo: should be IPNet?
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,
todo: should be IPNet?
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 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.