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 Observed: EdgeObservableRead + Send
type Observed: EdgeObservableRead + Send
The concrete edge observation type.
Required Methods§
fn connected_edges(&self) -> Vec<(Self::NodeId, Self::NodeId, Self::Observed)>
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)>
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.