Enum swarm_nl::core::AppResponse
source · pub enum AppResponse {
Show 15 variants
Echo(String),
DailPeerSuccess(String),
KademliaStoreRecordSuccess,
KademliaLookupSuccess(Vec<u8>),
KademliaGetProviders {
key: Vec<u8>,
providers: Vec<PeerIdString>,
},
KademliaNoProvidersFound,
KademliaGetRoutingTableInfo {
protocol_id: String,
},
FetchData(Vec<Vec<u8>>),
Error(NetworkError),
GetNetworkInfo {
peer_id: PeerId,
connected_peers: Vec<PeerId>,
external_addresses: Vec<MultiaddrString>,
},
GossipsubBroadcastSuccess,
GossipsubJoinSuccess,
GossipsubExitSuccess,
GossipsubGetInfo {
topics: Vec<String>,
mesh_peers: Vec<(PeerId, Vec<String>)>,
blacklist: HashSet<PeerId>,
},
GossipsubBlacklistSuccess,
}
Expand description
Response to requests sent from the application to the network layer.
Variants§
Echo(String)
The value written to the network.
DailPeerSuccess(String)
The peer we dailed.
KademliaStoreRecordSuccess
Store record success.
KademliaLookupSuccess(Vec<u8>)
DHT lookup result.
KademliaGetProviders
Nodes storing a particular record in the DHT.
KademliaNoProvidersFound
No providers found.
KademliaGetRoutingTableInfo
Routing table information.
FetchData(Vec<Vec<u8>>)
Result of RPC operation.
Error(NetworkError)
A network error occured while executing the request.
GetNetworkInfo
Important information about the node.
GossipsubBroadcastSuccess
Successfully broadcast to the network.
GossipsubJoinSuccess
Successfully joined a mesh network.
GossipsubExitSuccess
Successfully exited a mesh network.
GossipsubGetInfo
Gossipsub information about node.
Fields
GossipsubBlacklistSuccess
A peer was successfully blacklisted.
Trait Implementations§
source§impl Clone for AppResponse
impl Clone for AppResponse
source§fn clone(&self) -> AppResponse
fn clone(&self) -> AppResponse
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AppResponse
impl Debug for AppResponse
source§impl PartialEq for AppResponse
impl PartialEq for AppResponse
source§fn eq(&self, other: &AppResponse) -> bool
fn eq(&self, other: &AppResponse) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AppResponse
Auto Trait Implementations§
impl Freeze for AppResponse
impl RefUnwindSafe for AppResponse
impl Send for AppResponse
impl Sync for AppResponse
impl Unpin for AppResponse
impl UnwindSafe for AppResponse
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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