Templating

Trait Templating 

Source
pub trait Templating {
    type Context;
    type Value;

    // Required methods
    fn node(
        &self,
        graph: &Graph,
        index: usize,
        value: Self::Value,
        context: Self::Context,
    ) -> (String, String);
    fn edge(
        &self,
        graph: &Graph,
        source: usize,
        target: usize,
    ) -> (String, String);
}
Expand description

Trait for templating node and edge labels and tooltips.

Required Associated Types§

Source

type Context

The type of context shared across all nodes and edges.

Source

type Value

The type of value for each node.

Required Methods§

Source

fn node( &self, graph: &Graph, index: usize, value: Self::Value, context: Self::Context, ) -> (String, String)

Get the label and tooltip for a given node.

Source

fn edge(&self, graph: &Graph, source: usize, target: usize) -> (String, String)

Get the label and tooltip for a given edge.

Implementors§