[][src]Trait rgraph::Cache

pub trait Cache {
    fn get_value<T>(&self, name: &str) -> Result<T, SolverError>
    where
        T: Clone + 'static
;
fn save_value<T>(&mut self, name: &String, value: T)
    where
        T: Clone + 'static
;
fn save_value_str<T>(&mut self, name: &str, value: T)
    where
        T: Clone + 'static
; }

A convenience trait to allow the storage of asset values in between tasks or graph executions.

Required methods

fn get_value<T>(&self, name: &str) -> Result<T, SolverError> where
    T: Clone + 'static, 

Retrieves a value from the solver. It is required to know the name and type of the asset. Cast error will return SolveError::AssetWrongType

fn save_value<T>(&mut self, name: &String, value: T) where
    T: Clone + 'static, 

Saves a value to be available during execution. This routine can be used to feed initial values for Assets. i.e. unbond assets Assets not generated by any Task.

fn save_value_str<T>(&mut self, name: &str, value: T) where
    T: Clone + 'static, 

Saves a value to be available during execution. This routine can be used to feed initial values for Assets. i.e. unbond assets Assets not generated by any Task.

Loading content...

Implementors

impl Cache for ValuesCache[src]

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

Loading content...