pub struct HoprNetwork {
pub(crate) tracker: Arc<DashSet<PeerId>>,
pub(crate) store: Arc<NetworkPeerStore>,
pub(crate) control: Control,
pub(crate) protocol: StreamProtocol,
pub(crate) event_rx: InactiveReceiver<NetworkEvent>,
}Fields§
§tracker: Arc<DashSet<PeerId>>§store: Arc<NetworkPeerStore>§control: Control§protocol: StreamProtocol§event_rx: InactiveReceiver<NetworkEvent>Trait Implementations§
Source§impl Clone for HoprNetwork
impl Clone for HoprNetwork
Source§fn clone(&self) -> HoprNetwork
fn clone(&self) -> HoprNetwork
Returns a duplicate 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 HoprNetwork
impl Debug for HoprNetwork
Source§impl NetworkStreamControl for HoprNetwork
impl NetworkStreamControl for HoprNetwork
Source§impl NetworkView for HoprNetwork
impl NetworkView for HoprNetwork
Source§fn listening_as(&self) -> HashSet<Multiaddr>
fn listening_as(&self) -> HashSet<Multiaddr>
Multiaddresses used for listening by the local node.
Source§fn discovered_peers(&self) -> HashSet<PeerId>
fn discovered_peers(&self) -> HashSet<PeerId>
Peers collected by the network discovery mechanism.
Source§fn connected_peers(&self) -> HashSet<PeerId>
fn connected_peers(&self) -> HashSet<PeerId>
Peers currently connected and tracked by the network.
Source§fn is_connected(&self, peer: &PeerId) -> bool
fn is_connected(&self, peer: &PeerId) -> bool
Peers currently connected and tracked by the network.
Source§fn multiaddress_of(&self, peer: &PeerId) -> Option<HashSet<Multiaddr>>
fn multiaddress_of(&self, peer: &PeerId) -> Option<HashSet<Multiaddr>>
Translation of the peer into its known multiaddresses.
Source§fn subscribe_network_events(
&self,
) -> impl Stream<Item = NetworkEvent> + Send + 'static
fn subscribe_network_events( &self, ) -> impl Stream<Item = NetworkEvent> + Send + 'static
Subscribes to network events (peer connected/disconnected). Read more
Auto Trait Implementations§
impl Freeze for HoprNetwork
impl !RefUnwindSafe for HoprNetwork
impl Send for HoprNetwork
impl Sync for HoprNetwork
impl Unpin for HoprNetwork
impl !UnwindSafe for HoprNetwork
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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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