[][src]Struct rgraph::Graph

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]

pub fn new() -> Graph[src]

pub fn add_node<F: 'static>(&mut self, node: Node<F>) -> Result<(), GraphError> where
    F: Fn(&mut GraphSolver) -> Result<SolverStatus, SolverError>, 
[src]

pub fn get_node(&self, name: &str) -> Option<&dyn NodeRunner>[src]

pub fn get_terminals(&self) -> &[Rc<dyn NodeRunner>][src]

pub fn get_binding(&self, name: &String) -> Option<&String>[src]

pub fn get_binding_str(&self, name: &str) -> Option<&String>[src]

pub fn define_freestanding_asset<T: 'static + Clone>(
    &mut self,
    name: &str,
    val: T
) -> Result<(), GraphError>
[src]

declares and initializes a freestanding asset, this assets are defined as global inputs to the graph and can be used to feed initial values in the system

pub 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

pub fn what_provides(&self, name: &str) -> AssetProvider[src]

For a given asset name, identifies which node generates the it

pub fn get_unbound_assets(&self) -> Vec<&String>[src]

reports a collection of input assets which are not currenty bound, this elements are disconnected and will have no value satisfied during execution.

pub fn get_freestanding_assets(&self) -> &Vec<String>[src]

Trait Implementations

impl Default for Graph[src]

impl<'a> Labeller<'a, &'a str, (&'a str, &'a str, &'a str, &'a str)> for Graph[src]

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 node_color(&'a self, _node: &N) -> Option<LabelText<'a>>[src]

Maps n to one of the [graphviz color names][1]. If None is returned, no color attribute is specified. Read more

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 default arrow style. 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 default 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.

fn edge_color(&'a self, _e: &E) -> Option<LabelText<'a>>[src]

Maps e to one of the [graphviz color names][1]. If None is returned, no color attribute is specified. Read more

fn kind(&self) -> Kind[src]

The kind of graph, defaults to Kind::Digraph.

impl<'a> GraphWalk<'a, &'a str, (&'a str, &'a str, &'a str, &'a str)> for Graph[src]

Auto Trait Implementations

impl !Send for Graph

impl !Sync for Graph

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]