pub enum P2pResponse {
Show 17 variants
Watch(WatchResponse),
Version(VersionResponse),
FetchBitswap(RpcResult<BitswapResponse>),
FetchProviderDht(RpcResult<FetchProvidersDhtResponse>),
GetListeningAddrs(RpcResult<GetListeningAddrsResponse>),
GetPeers(RpcResult<GetPeersResponse>),
Lookup(RpcResult<LookupResponse>),
GossipsubPeers(RpcResult<GossipsubPeersResponse>),
GossipsubAllPeers(RpcResult<GossipsubAllPeersResponse>),
GossipsubPublish(RpcResult<GossipsubPublishResponse>),
GossipsubSubscribe(RpcResult<GossipsubSubscribeResponse>),
GossipsubTopics(RpcResult<GossipsubTopicsResponse>),
GossipsubUnsubscribe(RpcResult<GossipsubUnsubscribeResponse>),
LocalPeerId(RpcResult<LocalPeerIdResponse>),
ExternalAddrs(RpcResult<ExternalAddrsResponse>),
Listeners(RpcResult<ListenersResponse>),
UnitResult(RpcResult<()>),
}
Variants§
Watch(WatchResponse)
Version(VersionResponse)
FetchBitswap(RpcResult<BitswapResponse>)
FetchProviderDht(RpcResult<FetchProvidersDhtResponse>)
GetListeningAddrs(RpcResult<GetListeningAddrsResponse>)
GetPeers(RpcResult<GetPeersResponse>)
Lookup(RpcResult<LookupResponse>)
GossipsubPeers(RpcResult<GossipsubPeersResponse>)
GossipsubAllPeers(RpcResult<GossipsubAllPeersResponse>)
GossipsubPublish(RpcResult<GossipsubPublishResponse>)
GossipsubSubscribe(RpcResult<GossipsubSubscribeResponse>)
GossipsubTopics(RpcResult<GossipsubTopicsResponse>)
GossipsubUnsubscribe(RpcResult<GossipsubUnsubscribeResponse>)
LocalPeerId(RpcResult<LocalPeerIdResponse>)
ExternalAddrs(RpcResult<ExternalAddrsResponse>)
Listeners(RpcResult<ListenersResponse>)
UnitResult(RpcResult<()>)
Trait Implementations§
Source§impl Debug for P2pResponse
impl Debug for P2pResponse
Source§impl<'de> Deserialize<'de> for P2pResponse
impl<'de> Deserialize<'de> for P2pResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Result<BitswapResponse, RpcError>> for P2pResponse
impl From<Result<BitswapResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<BitswapResponse>) -> P2pResponse
fn from(original: RpcResult<BitswapResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<Result<ExternalAddrsResponse, RpcError>> for P2pResponse
impl From<Result<ExternalAddrsResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<ExternalAddrsResponse>) -> P2pResponse
fn from(original: RpcResult<ExternalAddrsResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<Result<FetchProvidersDhtResponse, RpcError>> for P2pResponse
impl From<Result<FetchProvidersDhtResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<FetchProvidersDhtResponse>) -> P2pResponse
fn from(original: RpcResult<FetchProvidersDhtResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<Result<GetListeningAddrsResponse, RpcError>> for P2pResponse
impl From<Result<GetListeningAddrsResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<GetListeningAddrsResponse>) -> P2pResponse
fn from(original: RpcResult<GetListeningAddrsResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<Result<GetPeersResponse, RpcError>> for P2pResponse
impl From<Result<GetPeersResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<GetPeersResponse>) -> P2pResponse
fn from(original: RpcResult<GetPeersResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<Result<GossipsubAllPeersResponse, RpcError>> for P2pResponse
impl From<Result<GossipsubAllPeersResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<GossipsubAllPeersResponse>) -> P2pResponse
fn from(original: RpcResult<GossipsubAllPeersResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<Result<GossipsubPeersResponse, RpcError>> for P2pResponse
impl From<Result<GossipsubPeersResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<GossipsubPeersResponse>) -> P2pResponse
fn from(original: RpcResult<GossipsubPeersResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<Result<GossipsubPublishResponse, RpcError>> for P2pResponse
impl From<Result<GossipsubPublishResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<GossipsubPublishResponse>) -> P2pResponse
fn from(original: RpcResult<GossipsubPublishResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<Result<GossipsubSubscribeResponse, RpcError>> for P2pResponse
impl From<Result<GossipsubSubscribeResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<GossipsubSubscribeResponse>) -> P2pResponse
fn from(original: RpcResult<GossipsubSubscribeResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<Result<GossipsubTopicsResponse, RpcError>> for P2pResponse
impl From<Result<GossipsubTopicsResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<GossipsubTopicsResponse>) -> P2pResponse
fn from(original: RpcResult<GossipsubTopicsResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<Result<GossipsubUnsubscribeResponse, RpcError>> for P2pResponse
impl From<Result<GossipsubUnsubscribeResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<GossipsubUnsubscribeResponse>) -> P2pResponse
fn from(original: RpcResult<GossipsubUnsubscribeResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<Result<ListenersResponse, RpcError>> for P2pResponse
impl From<Result<ListenersResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<ListenersResponse>) -> P2pResponse
fn from(original: RpcResult<ListenersResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<Result<LocalPeerIdResponse, RpcError>> for P2pResponse
impl From<Result<LocalPeerIdResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<LocalPeerIdResponse>) -> P2pResponse
fn from(original: RpcResult<LocalPeerIdResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<Result<LookupResponse, RpcError>> for P2pResponse
impl From<Result<LookupResponse, RpcError>> for P2pResponse
Source§fn from(original: RpcResult<LookupResponse>) -> P2pResponse
fn from(original: RpcResult<LookupResponse>) -> P2pResponse
Converts to this type from the input type.
Source§impl From<VersionResponse> for P2pResponse
impl From<VersionResponse> for P2pResponse
Source§fn from(original: VersionResponse) -> P2pResponse
fn from(original: VersionResponse) -> P2pResponse
Converts to this type from the input type.
Source§impl From<WatchResponse> for P2pResponse
impl From<WatchResponse> for P2pResponse
Source§fn from(original: WatchResponse) -> P2pResponse
fn from(original: WatchResponse) -> P2pResponse
Converts to this type from the input type.
Source§impl Serialize for P2pResponse
impl Serialize for P2pResponse
Source§impl TryFrom<P2pResponse> for RpcResult<BitswapResponse>
impl TryFrom<P2pResponse> for RpcResult<BitswapResponse>
Source§impl TryFrom<P2pResponse> for RpcResult<ExternalAddrsResponse>
impl TryFrom<P2pResponse> for RpcResult<ExternalAddrsResponse>
Source§impl TryFrom<P2pResponse> for RpcResult<GetPeersResponse>
impl TryFrom<P2pResponse> for RpcResult<GetPeersResponse>
Source§impl TryFrom<P2pResponse> for RpcResult<GossipsubPeersResponse>
impl TryFrom<P2pResponse> for RpcResult<GossipsubPeersResponse>
Source§impl TryFrom<P2pResponse> for RpcResult<ListenersResponse>
impl TryFrom<P2pResponse> for RpcResult<ListenersResponse>
Source§impl TryFrom<P2pResponse> for RpcResult<LocalPeerIdResponse>
impl TryFrom<P2pResponse> for RpcResult<LocalPeerIdResponse>
Source§impl TryFrom<P2pResponse> for RpcResult<LookupResponse>
impl TryFrom<P2pResponse> for RpcResult<LookupResponse>
Source§impl TryFrom<P2pResponse> for VersionResponse
impl TryFrom<P2pResponse> for VersionResponse
Source§impl TryFrom<P2pResponse> for WatchResponse
impl TryFrom<P2pResponse> for WatchResponse
Auto Trait Implementations§
impl !Freeze for P2pResponse
impl RefUnwindSafe for P2pResponse
impl Send for P2pResponse
impl Sync for P2pResponse
impl Unpin for P2pResponse
impl UnwindSafe for P2pResponse
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more