Skip to main content

NetworkGraphConnectivity

Trait NetworkGraphConnectivity 

pub trait NetworkGraphConnectivity {
    type NodeId: Send + Sync;
    type Observed: EdgeObservableRead + Send;

    // Required methods
    fn connected_edges(
        &self,
    ) -> Vec<(Self::NodeId, Self::NodeId, Self::Observed)>;
    fn reachable_edges(
        &self,
    ) -> Vec<(Self::NodeId, Self::NodeId, Self::Observed)>;
}
Expand description

Topology enumeration — which edges exist and which are reachable.

Unlike NetworkGraphTraverse (path planning), this trait answers “what is connected to what” without computing routes.

Required Associated Types§

type NodeId: Send + Sync

The identifier type used to reference nodes in the graph.

type Observed: EdgeObservableRead + Send

The concrete edge observation type.

Required Methods§

fn connected_edges(&self) -> Vec<(Self::NodeId, Self::NodeId, Self::Observed)>

Returns all edges in the graph as (source, destination, observations) triples.

Only nodes that participate in at least one edge appear in the result. Isolated nodes (no incoming or outgoing edges) are omitted.

fn reachable_edges(&self) -> Vec<(Self::NodeId, Self::NodeId, Self::Observed)>

Returns edges reachable from the graph’s identity node via directed traversal.

Only edges where both the source and destination are reachable are included. Disconnected subgraphs that cannot be routed through are excluded.

Implementations on Foreign Types§

§

impl<'a, T> NetworkGraphConnectivity for &'a T

§

impl<T> NetworkGraphConnectivity for Box<T>

§

impl<T> NetworkGraphConnectivity for Arc<T>

Implementors§