Trait Appendable

Source
pub trait Appendable {
    // Required methods
    fn append_to(
        &self,
        graph: &StackGraph,
        partials: &mut PartialPaths,
        path: &mut PartialPath,
    ) -> Result<(), PathResolutionError>;
    fn start_node(&self) -> Handle<Node>;
    fn end_node(&self) -> Handle<Node>;
    fn display<'a>(
        &'a self,
        graph: &'a StackGraph,
        partials: &'a mut PartialPaths,
    ) -> Box<dyn Display + 'a>;
}
Expand description

Something that can be appended to a partial path.

Required Methods§

Source

fn append_to( &self, graph: &StackGraph, partials: &mut PartialPaths, path: &mut PartialPath, ) -> Result<(), PathResolutionError>

Append this appendable to the given path. Resolving jump nodes and renaming unused_variables is part of the responsibility of this method.

Source

fn start_node(&self) -> Handle<Node>

Return the start node.

Source

fn end_node(&self) -> Handle<Node>

Return the end node.

Source

fn display<'a>( &'a self, graph: &'a StackGraph, partials: &'a mut PartialPaths, ) -> Box<dyn Display + 'a>

Return a Display implementation.

Implementors§