PathExists

Trait PathExists 

Source
pub trait PathExists {
    type Graph: VisitableGraph;

    // Required method
    fn path_exists_opt(
        &self,
        from: impl AsRef<NodeID>,
        to: impl AsRef<NodeID>,
        excluded_edge: Option<impl AsRef<EdgeID>>,
    ) -> Result<bool>;

    // Provided methods
    fn path_exists(
        &self,
        from: impl AsRef<NodeID>,
        to: impl AsRef<NodeID>,
    ) -> Result<bool> { ... }
    fn can_add_dag_edge(
        &self,
        from: impl AsRef<NodeID>,
        to: impl AsRef<NodeID>,
        excluded_edge: Option<impl AsRef<EdgeID>>,
    ) -> Result<bool> { ... }
    fn can_move_dag_edge(
        &self,
        edge: impl AsRef<EdgeID>,
        new_source: impl AsRef<NodeID>,
        new_target: impl AsRef<NodeID>,
    ) -> Result<bool> { ... }
}
Expand description

A trait for a graph that supports checking whether a path exists between two nodes.

Required Associated Types§

Required Methods§

Source

fn path_exists_opt( &self, from: impl AsRef<NodeID>, to: impl AsRef<NodeID>, excluded_edge: Option<impl AsRef<EdgeID>>, ) -> Result<bool>

Provided Methods§

Source

fn path_exists( &self, from: impl AsRef<NodeID>, to: impl AsRef<NodeID>, ) -> Result<bool>

Source

fn can_add_dag_edge( &self, from: impl AsRef<NodeID>, to: impl AsRef<NodeID>, excluded_edge: Option<impl AsRef<EdgeID>>, ) -> Result<bool>

Source

fn can_move_dag_edge( &self, edge: impl AsRef<EdgeID>, new_source: impl AsRef<NodeID>, new_target: impl AsRef<NodeID>, ) -> Result<bool>

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.

Implementors§