Trait NodeWalk

Source
pub trait NodeWalk<Graph: GraphBase, NodeSubwalk: NodeWalk<Graph, NodeSubwalk> + ?Sized>: Sequence<Graph::NodeIndex, NodeSubwalk> {
    // Provided methods
    fn clone_as_edge_walk<ResultWalk: From<Vec<Graph::EdgeIndex>>>(
        &self,
        graph: &Graph,
    ) -> Option<ResultWalk>
       where Graph: StaticGraph { ... }
    fn is_proper_subwalk_of(&self, other: &Self) -> bool
       where Graph::NodeIndex: Eq { ... }
}
Expand description

A sequence of nodes in a graph, where each consecutive pair of nodes is connected by an edge.

Provided Methods§

Source

fn clone_as_edge_walk<ResultWalk: From<Vec<Graph::EdgeIndex>>>( &self, graph: &Graph, ) -> Option<ResultWalk>
where Graph: StaticGraph,

Returns the edge walk represented by this node walk. If there is a consecutive pair of nodes with a multiedge, then None is returned. If this walk contains less than two nodes, then None is returned. If there is a consecutive pair of node not connected by an edge, then this method panics.

Source

fn is_proper_subwalk_of(&self, other: &Self) -> bool
where Graph::NodeIndex: Eq,

Returns true if this is a proper subwalk of the given walk. Proper means that the walks are not equal.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<Graph: GraphBase> NodeWalk<Graph, [<Graph as GraphBase>::NodeIndex]> for [Graph::NodeIndex]

Implementors§

Source§

impl<Graph: GraphBase> NodeWalk<Graph, [<Graph as GraphBase>::NodeIndex]> for VecNodeWalk<Graph>