Struct calc_graph::Const [−][src]
pub struct Const<T>(_);
Calculates a node's value by returning the same value every time.
Trait Implementations
impl<T: Clone> Calc for Const<T>
[src]
impl<T: Clone> Calc for Const<T>
type Value = T
The type of values calculated by the node.
fn add_dep(&mut self, _seen: &mut BitSet, _dep: usize)
[src]
fn add_dep(&mut self, _seen: &mut BitSet, _dep: usize)
When this node is used as a precedent, add_dep
is called by dependent nodes when they are created. Read more
fn eval(&mut self, _dirty: &mut BitSet) -> (usize, T)
[src]
fn eval(&mut self, _dirty: &mut BitSet) -> (usize, T)
Returns the value held within the node and the version number of the inputs used to calcuate that value. The value is recalculated if needed. Read more