Struct calc_graph::Node[][src]

pub struct Node<C> { /* fields omitted */ }

Represents a value within the graph.

Nodes can calculate their value automatically based on other nondes.

Methods

impl<C: Calc> Node<C> where
    C::Value: Clone
[src]

Returns the node's value, recalculating it if needed.

impl<C: Calc> Node<C>
[src]

Wraps this node so that it can be used as an input to two or more dependent nodes.

impl<C: Calc + Send + 'static> Node<C>
[src]

Wraps this node so that its Calc type is hidden.

Boxing is needed when:

  • you need to write the type of the node, but you can't write the name of the concrete Calc type (for instance, it's a func node involving a closure)
  • you have a choice of types for a node (for instance, if a { a_node.boxed() } else { b_node.boxed() })

impl<T: Clone> Node<Const<T>>
[src]

Returns the const node's value.

impl<T: Clone> Node<Source<T>>
[src]

Returns the source node's value.

impl<T> Node<Source<T>>
[src]

Changes the value held within the source node based on the current value.

Replaces the value held within the source node.

impl<C1: Calc> Node<C1>
[src]

Returns a new node whose value is calculated from this node.

impl<C1: Calc> Node<C1>
[src]

Returns a new node whose value is calculated from this node and another node.

impl<C1: Calc> Node<C1>
[src]

Returns a new node whose value is calculated from this node and 2 other nodes.

impl<C1: Calc> Node<C1>
[src]

Returns a new node whose value is calculated from this node and 3 other nodes.

impl<C1: Calc> Node<C1>
[src]

Returns a new node whose value is calculated from this node and 4 other nodes.

impl<C1: Calc> Node<C1>
[src]

Returns a new node whose value is calculated from this node and 5 other nodes.

impl<C1: Calc> Node<C1>
[src]

Returns a new node whose value is calculated from this node and 6 other nodes.

impl<C1: Calc> Node<C1>
[src]

Returns a new node whose value is calculated from this node and 7 other nodes.

Trait Implementations

impl<C: Clone> Clone for Node<C>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<C> Send for Node<C> where
    C: Send

impl<C> Sync for Node<C> where
    C: Sync