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§
Sourcetype NodeData: RenderableNode
type NodeData: RenderableNode
The renderable node type associated with the resolver.
Required Methods§
Sourcefn resolve(&self, node_index: NodeIndex) -> Option<&Self::NodeData>
fn resolve(&self, node_index: NodeIndex) -> Option<&Self::NodeData>
Resolves a NodeIndex to its associated metadata.
Sourcefn resolve_edge_color(&self, source: NodeIndex, target: NodeIndex) -> String
fn resolve_edge_color(&self, source: NodeIndex, target: NodeIndex) -> String
Resolves the color of the edge between two nodes.