Skip to main content

HasNetworkView

Trait HasNetworkView 

pub trait HasNetworkView {
    type NetworkView: NetworkView + Send + Sync;

    // Required methods
    fn network_view(&self) -> &Self::NetworkView;
    fn status(&self) -> ComponentStatus;
}
Expand description

Provides read-only access to the network layer (peer connectivity, addresses).

Required Associated Types§

type NetworkView: NetworkView + Send + Sync

The concrete NetworkView implementation.

Required Methods§

fn network_view(&self) -> &Self::NetworkView

Returns a reference to the network view.

fn status(&self) -> ComponentStatus

Reports the current health of the network component.

Implementations on Foreign Types§

§

impl<'a, T> HasNetworkView for &'a T
where T: 'a + HasNetworkView + ?Sized,

§

impl<T> HasNetworkView for Arc<T>
where T: HasNetworkView + ?Sized,

Implementors§

Source§

impl<Chain, Graph, Net, TMgr> HasNetworkView for Hopr<Chain, Graph, Net, TMgr>
where Chain: Send + Sync + 'static, Graph: Send + Sync + 'static, Net: NetworkView + Send + Sync + 'static,

Source§

type NetworkView = HoprTransport<Chain, Graph, Net>