Struct calc_graph::Func1
source · pub struct Func1<C1, T, F> { /* private fields */ }
Expand description
Calculates a value from another node.
Trait Implementations
sourceimpl<C1: Calc, T: Clone + PartialEq, F: FnMut(C1::Value) -> T> Calc for Func1<C1, T, F>
impl<C1: Calc, T: Clone + PartialEq, F: FnMut(C1::Value) -> T> Calc for Func1<C1, T, F>
type Value = T
type Value = T
The type of values calculated by the node.
sourcefn 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
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 moreAuto Trait Implementations
impl<C1, T, F> RefUnwindSafe for Func1<C1, T, F>where
C1: RefUnwindSafe,
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<C1, T, F> Send for Func1<C1, T, F>where
C1: Send,
F: Send,
T: Send,
impl<C1, T, F> Sync for Func1<C1, T, F>where
C1: Sync,
F: Sync,
T: Sync,
impl<C1, T, F> Unpin for Func1<C1, T, F>where
C1: Unpin,
F: Unpin,
T: Unpin,
impl<C1, T, F> UnwindSafe for Func1<C1, T, F>where
C1: UnwindSafe,
F: UnwindSafe,
T: UnwindSafe,
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