gbf_core::cfg_dot

Trait NodeResolver

Source
pub trait NodeResolver {
    type NodeData: RenderableNode;

    // Required methods
    fn resolve(&self, node_index: NodeIndex) -> Option<&Self::NodeData>;
    fn resolve_edge_color(&self, source: NodeIndex, target: NodeIndex) -> String;
}
Expand description

Trait for resolving NodeIndex to renderable metadata.

Required Associated Types§

Source

type NodeData: RenderableNode

The renderable node type associated with the resolver.

Required Methods§

Source

fn resolve(&self, node_index: NodeIndex) -> Option<&Self::NodeData>

Resolves a NodeIndex to its associated metadata.

Source

fn resolve_edge_color(&self, source: NodeIndex, target: NodeIndex) -> String

Resolves the color of the edge between two nodes.

Implementors§