Skip to main content

NodeGraphExt

Trait NodeGraphExt 

Source
pub trait NodeGraphExt {
    // Required methods
    fn clear_links(&mut self);
    fn is_linked(&self, a: usize, b: usize) -> bool;
    fn link_randomly(&mut self, possibilities: &Vec<Node>);
    fn link(&mut self, a: usize, b: usize);
    fn unlink(&mut self, a: usize, b: usize);
    fn next_unvisited(
        &self,
        i: usize,
        visited: &HashSet<usize>,
    ) -> Option<&usize>;
}

Required Methods§

Source

fn is_linked(&self, a: usize, b: usize) -> bool

Source

fn next_unvisited(&self, i: usize, visited: &HashSet<usize>) -> Option<&usize>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl NodeGraphExt for Vec<Node>

Source§

fn is_linked(&self, a: usize, b: usize) -> bool

Source§

fn next_unvisited(&self, i: usize, visited: &HashSet<usize>) -> Option<&usize>

Implementors§