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 = Result<PeerInfo, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PeerDump, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_peer_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PeerStats, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_discovery_table<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_block_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_list_blocked_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_block_addr<'life0, 'async_trait>(
&'life0 self,
ip: IpAddr,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_unblock_addr<'life0, 'async_trait>(
&'life0 self,
ip: IpAddr,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_list_blocked_addrs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<IpAddr>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_block_subnet<'life0, 'async_trait>(
&'life0 self,
subnet: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_unblock_subnet<'life0, 'async_trait>(
&'life0 self,
subnet: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_list_blocked_subnets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_protect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_unprotect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_connect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn opp2p_disconnect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}
Available on crate feature
rpc-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 = Result<PeerInfo, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_self<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PeerInfo, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns information of node
fn opp2p_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PeerDump, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_peer_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PeerStats, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_discovery_table<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_block_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_list_blocked_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_block_addr<'life0, 'async_trait>(
&'life0 self,
ip: IpAddr,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_unblock_addr<'life0, 'async_trait>(
&'life0 self,
ip: IpAddr,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_list_blocked_addrs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<IpAddr>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Sourcefn opp2p_block_subnet<'life0, 'async_trait>(
&'life0 self,
subnet: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_block_subnet<'life0, 'async_trait>(
&'life0 self,
subnet: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
todo: should be IPNet?
Sourcefn opp2p_unblock_subnet<'life0, 'async_trait>(
&'life0 self,
subnet: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_unblock_subnet<'life0, 'async_trait>(
&'life0 self,
subnet: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
todo: should be IPNet?
Sourcefn opp2p_list_blocked_subnets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_list_blocked_subnets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
todo: should be IPNet?
fn opp2p_protect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_unprotect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_connect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn opp2p_disconnect_peer<'life0, 'async_trait>(
&'life0 self,
peer: String,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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.