[][src]Struct rgraph::GraphSolver

pub struct GraphSolver<'a, 'b> { /* fields omitted */ }

The graph solver is a transient object which can execute the tasks described in a graph. It is designed to be generated and dropped on every execution.

Methods

impl<'a, 'b> GraphSolver<'a, 'b>[src]

pub fn new(
    graph: &'a Graph,
    last_cache: &'b mut ValuesCache
) -> GraphSolver<'a, 'b>
[src]

creates a solver for graph 'graph', using cache from a previous solve. the cache may be empty.

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

pub fn execute(&mut self, name: &str) -> Result<SolverStatus, SolverError>[src]

Executes a task by name, all tasks needed to provide Assets are transitively executed

pub fn execute_terminals(&mut self) -> Result<SolverStatus, SolverError>[src]

pub fn input_is_new<T>(&self, new_value: &T, name: &String) -> bool where
    T: Clone + Comparable + 'static, 
[src]

Check if the input is still valid. This function is used to compute if the input of a task has changed over iterations. if all inputs are cached and equal to current values, and a cached output is available. The output will be considered valid and the computation skipped

pub fn input_is_new_str<T>(&self, new_value: &T, name: &str) -> bool where
    T: Clone + Comparable + 'static, 
[src]

Check if the input is still valid. This function is used to compute if the input of a task has changed over iterations. if all inputs are cached and equal to current values, and a cached output is available. The output will be considered valid and the computation skipped

pub fn use_old_ouput<T: AsRef<str>>(&mut self, ouputs: &[T]) -> bool[src]

function to decide whenever the set of values is still valid or the producing node of any of the values needs to be executed

pub fn get_values(&self) -> &ValuesCache[src]

Trait Implementations

impl<'a, 'b> Cache for GraphSolver<'a, 'b>[src]

impl<'a, 'b> Drop for GraphSolver<'a, 'b>[src]

Auto Trait Implementations

impl<'a, 'b> !Send for GraphSolver<'a, 'b>

impl<'a, 'b> !Sync for GraphSolver<'a, 'b>

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]