iroh_rpc_types::p2p

Enum P2pResponse

Source
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§

Trait Implementations§

Source§

impl Debug for P2pResponse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for P2pResponse

Source§

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<(), RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<()>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<BitswapResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<BitswapResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<ExternalAddrsResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<ExternalAddrsResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<FetchProvidersDhtResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<FetchProvidersDhtResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<GetListeningAddrsResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<GetListeningAddrsResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<GetPeersResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<GetPeersResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<GossipsubAllPeersResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<GossipsubAllPeersResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<GossipsubPeersResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<GossipsubPeersResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<GossipsubPublishResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<GossipsubPublishResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<GossipsubSubscribeResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<GossipsubSubscribeResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<GossipsubTopicsResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<GossipsubTopicsResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<GossipsubUnsubscribeResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<GossipsubUnsubscribeResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<ListenersResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<ListenersResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<LocalPeerIdResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<LocalPeerIdResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<Result<LookupResponse, RpcError>> for P2pResponse

Source§

fn from(original: RpcResult<LookupResponse>) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<VersionResponse> for P2pResponse

Source§

fn from(original: VersionResponse) -> P2pResponse

Converts to this type from the input type.
Source§

impl From<WatchResponse> for P2pResponse

Source§

fn from(original: WatchResponse) -> P2pResponse

Converts to this type from the input type.
Source§

impl Serialize for P2pResponse

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<P2pResponse> for RpcResult<()>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<BitswapResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<ExternalAddrsResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<FetchProvidersDhtResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<GetListeningAddrsResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<GetPeersResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<GossipsubAllPeersResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<GossipsubPeersResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<GossipsubPublishResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<GossipsubSubscribeResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<GossipsubTopicsResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<GossipsubUnsubscribeResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<ListenersResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<LocalPeerIdResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for RpcResult<LookupResponse>

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for VersionResponse

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<P2pResponse> for WatchResponse

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: P2pResponse) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T

Source§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,