Skip to main content

HasGraphView

Trait HasGraphView 

pub trait HasGraphView {
    type Graph: NetworkGraphView<NodeId = OffchainPublicKey> + NetworkGraphConnectivity<NodeId = OffchainPublicKey> + NetworkGraphTraverse<NodeId = OffchainPublicKey> + Send + Sync;

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

Provides read-only access to the network graph and its health status.

Required Associated Types§

type Graph: NetworkGraphView<NodeId = OffchainPublicKey> + NetworkGraphConnectivity<NodeId = OffchainPublicKey> + NetworkGraphTraverse<NodeId = OffchainPublicKey> + Send + Sync

The concrete graph type, constrained to read-only operations.

Required Methods§

fn graph(&self) -> &Self::Graph

Returns a reference to the network graph.

fn status(&self) -> ComponentStatus

Reports the current health of the graph component.

Implementations on Foreign Types§

§

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

§

type Graph = <T as HasGraphView>::Graph

§

fn graph(&self) -> &<&'a T as HasGraphView>::Graph

§

fn status(&self) -> ComponentStatus

§

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

§

type Graph = <T as HasGraphView>::Graph

§

fn graph(&self) -> &<Arc<T> as HasGraphView>::Graph

§

fn status(&self) -> ComponentStatus

Implementors§

Source§

impl<Chain, Graph, Net, TMgr> HasGraphView for Hopr<Chain, Graph, Net, TMgr>
where Chain: HoprChainApi + Clone + Send + Sync + 'static, Graph: HoprGraphApi<HoprNodeId = OffchainPublicKey> + NetworkGraphConnectivity<NodeId = OffchainPublicKey> + Clone + Send + Sync + 'static, <Graph as NetworkGraphTraverse>::Observed: EdgeObservableRead + Send + 'static, <Graph as NetworkGraphWrite>::Observed: EdgeObservableWrite + Send, Net: NetworkView + NetworkStreamControl + Send + Sync + Clone + 'static,

Source§

type Graph = Graph