pub struct LeafNode<T> { /* private fields */ }
Expand description
A node which has no dependencies. Leaf nodes receive their state from outside of the graph structure from calls to update.
Implementations§
source§impl<T> LeafNode<T>where
T: UpdateLeaf,
impl<T> LeafNode<T>where T: UpdateLeaf,
sourcepub fn new_with_id(data: T, id: usize) -> Rc<LeafNode<T>>
pub fn new_with_id(data: T, id: usize) -> Rc<LeafNode<T>>
Create this node with a specified Id. Useful for tests.
sourcepub fn update(&self, input: <T as UpdateLeaf>::Input)
pub fn update(&self, input: <T as UpdateLeaf>::Input)
The public interface to provide data to mutate the inner leaf.