Struct calc_graph::Source
source · pub struct Source<T> { /* private fields */ }
Expand description
Holds a value that can be updated directly from outside the graph.
Trait Implementations
sourceimpl<T: Clone> Calc for Source<T>
impl<T: Clone> Calc for Source<T>
type Value = T
type Value = T
The type of values calculated by the node.
sourcefn add_dep(&mut self, _seen: &mut BitSet, dep: NonZeroUsize)
fn add_dep(&mut self, _seen: &mut BitSet, dep: NonZeroUsize)
When this node is used as a precedent,
add_dep
is called by dependent nodes when they are created. Read moresourcefn eval(&mut self, _dirty: &mut BitSet) -> (NonZeroUsize, T)
fn eval(&mut self, _dirty: &mut BitSet) -> (NonZeroUsize, 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
Auto Trait Implementations
impl<T> !RefUnwindSafe for Source<T>
impl<T> Send for Source<T>where
T: Send,
impl<T> Sync for Source<T>where
T: Send,
impl<T> Unpin for Source<T>
impl<T> !UnwindSafe for Source<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more