Struct rgraph::Graph
[−]
[src]
pub struct Graph { /* fields omitted */ }
The graph class itself. It holds the static information about the tasks (Nodes) and how they depend on each other by waiting on resources (Assets)
Methods
impl Graph
[src]
fn new() -> Graph
[src]
fn add_node<F: 'static>(&mut self, node: Node<F>) -> Result<(), GraphError> where
F: Fn(&mut GraphSolver) -> Result<SolverStatus, SolverError>,
[src]
F: Fn(&mut GraphSolver) -> Result<SolverStatus, SolverError>,
fn get_node(&self, name: &str) -> Option<&NodeRunner>
[src]
fn get_terminals(&self) -> &[Rc<NodeRunner>]
[src]
fn get_binding(&self, name: &str) -> Option<&String>
[src]
fn bind_asset(&mut self, src: &str, sink: &str) -> Result<(), GraphError>
[src]
Binds two nodes. An asset satisfied by a task, will be the input for another task under a different asset name. One output asset can be used in one or more inputs. If the input is already bound, the link will be overwritten
fn what_provides(&self, name: &str) -> Option<&NodeRunner>
[src]
For a given asset name, identifies which node generates the it
fn get_free_assets(&self) -> Vec<&String>
[src]
Trait Implementations
impl<'a> Labeller<'a, &'a str, (&'a str, &'a str, &'a str, &'a str)> for Graph
[src]
fn graph_id(&'a self) -> Id<'a>
[src]
Must return a DOT compatible identifier naming the graph.
fn node_id(&'a self, n: &&'a str) -> Id<'a>
[src]
Maps n
to a unique identifier with respect to self
. The implementer is responsible for ensuring that the returned name is a valid DOT identifier. Read more
fn edge_label<'b>(
&'b self,
edge: &(&'a str, &'a str, &'a str, &'a str)
) -> LabelText<'b>
[src]
&'b self,
edge: &(&'a str, &'a str, &'a str, &'a str)
) -> LabelText<'b>
Maps e
to a label that will be used in the rendered output. The label need not be unique, and may be the empty string; the default is in fact the empty string. Read more
fn node_shape(&'a self, _node: &N) -> Option<LabelText<'a>>
[src]
Maps n
to one of the [graphviz shape
names][1]. If None
is returned, no shape
attribute is specified. Read more
fn node_label(&'a self, n: &N) -> LabelText<'a>
[src]
Maps n
to a label that will be used in the rendered output. The label need not be unique, and may be the empty string; the default is just the output from node_id
. Read more
fn node_style(&'a self, _n: &N) -> Style
[src]
Maps n
to a style that will be used in the rendered output.
fn edge_end_arrow(&'a self, _e: &E) -> Arrow
[src]
Maps e
to arrow style that will be used on the end of an edge. Defaults to normal. Read more
fn edge_start_arrow(&'a self, _e: &E) -> Arrow
[src]
Maps e
to arrow style that will be used on the end of an edge. Defaults to no arrow style. Read more
fn edge_style(&'a self, _e: &E) -> Style
[src]
Maps e
to a style that will be used in the rendered output.
impl<'a> GraphWalk<'a, &'a str, (&'a str, &'a str, &'a str, &'a str)> for Graph
[src]
fn nodes(&'a self) -> Nodes<'a, &'a str>
[src]
Returns all the nodes in this graph.
fn edges(&'a self) -> Edges<'a, (&'a str, &'a str, &'a str, &'a str)>
[src]
Returns all of the edges in this graph.
fn source(&self, e: &(&'a str, &'a str, &'a str, &'a str)) -> &'a str
[src]
The source node for edge
.
fn target(&self, e: &(&'a str, &'a str, &'a str, &'a str)) -> &'a str
[src]
The target node for edge
.