pub struct P2PClient { /* private fields */ }Implementations§
Source§impl P2PClient
impl P2PClient
Sourcepub async fn get_peer_info(&self) -> Result<Vec<PeerInfo>>
pub async fn get_peer_info(&self) -> Result<Vec<PeerInfo>>
Get information about connected peers
Sourcepub async fn get_net_info(&self) -> Result<NetInfo>
pub async fn get_net_info(&self) -> Result<NetInfo>
Get network information
Sourcepub async fn get_peer_info_response(&self) -> Result<GetPeerInfoResponse>
pub async fn get_peer_info_response(&self) -> Result<GetPeerInfoResponse>
Get the full peer info response
Sourcepub async fn get_net_info_response(&self) -> Result<GetNetInfoResponse>
pub async fn get_net_info_response(&self) -> Result<GetNetInfoResponse>
Get the full network info response
Sourcepub async fn peer_count(&self) -> Result<usize>
pub async fn peer_count(&self) -> Result<usize>
Get the number of connected peers
Auto Trait Implementations§
impl !Freeze for P2PClient
impl !RefUnwindSafe for P2PClient
impl Send for P2PClient
impl Sync for P2PClient
impl Unpin for P2PClient
impl !UnwindSafe for P2PClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request