Values

Trait Values 

Source
pub trait Values {
    type Context;
    type Value;
    type Output;

    // Required methods
    fn context(&self) -> Self::Context;
    fn value(&self, index: usize) -> Self::Value;
    fn output(&self, index: usize) -> Self::Output;
}
Expand description

Trait for providing values for coloring nodes.

Required Associated Types§

Source

type Context

The type of context shared across all nodes.

Source

type Value

The type of value for each node.

Source

type Output

The type of output used for coloring.

Required Methods§

Source

fn context(&self) -> Self::Context

Get the shared context.

Source

fn value(&self, index: usize) -> Self::Value

Get the value for the node at the given index.

§Panics

May panic if the node index does not exist.

Source

fn output(&self, index: usize) -> Self::Output

Get the output for the node at the given index.

§Panics

May panic if the node index does not exist.

Implementations on Foreign Types§

Source§

impl Values for Option<NodeColoringValues>

Source§

type Context = Option<NodeColoringScheme>

Source§

type Value = Option<usize>

Source§

type Output = Option<f64>

Source§

fn context(&self) -> Self::Context

Source§

fn value(&self, index: usize) -> Self::Value

Source§

fn output(&self, index: usize) -> Self::Output

Implementors§