[−][src]Struct rgraph::GraphSolver
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]
graph: &'a Graph,
last_cache: &'b mut ValuesCache
) -> GraphSolver<'a, 'b>
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]
T: Clone + Comparable + 'static,
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]
T: Clone + Comparable + 'static,
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]
fn get_value<T>(&self, name: &str) -> Result<T, SolverError> where
T: Clone + 'static,
[src]
T: Clone + 'static,
fn save_value<T>(&mut self, name: &String, value: T) where
T: Clone + 'static,
[src]
T: Clone + 'static,
fn save_value_str<T>(&mut self, name: &str, value: T) where
T: Clone + 'static,
[src]
T: Clone + 'static,
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,