IsTree

Trait IsTree 

Source
pub trait IsTree {
    type Graph: VisitableGraph;

    // Required method
    fn is_tree(&self, root: impl AsRef<NodeID>) -> bool;

    // Provided method
    fn check_is_tree(&self, root: impl AsRef<NodeID>) -> Result<()> { ... }
}
Expand description

A trait for a graph that supports checking whether it is a tree.

Required Associated Types§

Required Methods§

Source

fn is_tree(&self, root: impl AsRef<NodeID>) -> bool

Provided Methods§

Source

fn check_is_tree(&self, root: impl AsRef<NodeID>) -> Result<()>

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§

Source§

impl<G> IsTree for G

Source§

type Graph = G