Node

Trait Node 

Source
pub trait Node: MutableNode {
    // Required methods
    fn cycle(&self, state: &mut GraphState) -> bool;
    fn setup(&self, state: &mut GraphState);
    fn start(&self, state: &mut GraphState);
    fn stop(&self, state: &mut GraphState);
    fn teardown(&self, state: &mut GraphState);
}
Expand description

A wiring point in the Graph.

Required Methods§

Source

fn cycle(&self, state: &mut GraphState) -> bool

This is like Node::cycle but doesn’t require mutable self

Source

fn setup(&self, state: &mut GraphState)

Source

fn start(&self, state: &mut GraphState)

Source

fn stop(&self, state: &mut GraphState)

Source

fn teardown(&self, state: &mut GraphState)

Trait Implementations§

Source§

impl Display for dyn Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl NodeOperators for dyn Node

Source§

fn count(self: &Rc<Self>) -> Rc<dyn Stream<u64>>

Running count of the number of times it’s source ticks. Read more
Source§

fn ticked_at(self: &Rc<Self>) -> Rc<dyn Stream<NanoTime>>

Emits the time of source ticks in nanos from unix epoch. Read more
Source§

fn ticked_at_elapsed(self: &Rc<Self>) -> Rc<dyn Stream<NanoTime>>

Emits the time of source ticks relative to the start. Read more
Source§

fn produce<T: Element>( self: &Rc<Self>, func: impl Fn() -> T + 'static, ) -> Rc<dyn Stream<T>>

Emits the result of supplied closure on each upstream tick. Read more
Source§

fn run(self: &Rc<Self>, run_mode: RunMode, run_for: RunFor) -> Result<()>

Shortcut for Graph::run i.e. initialise and execute the graph. Read more
Source§

fn into_graph(self: &Rc<Self>, run_mode: RunMode, run_for: RunFor) -> Graph

Implementations on Foreign Types§

Source§

impl<NODE: MutableNode> Node for RefCell<NODE>

Source§

fn cycle(&self, state: &mut GraphState) -> bool

Source§

fn setup(&self, state: &mut GraphState)

Source§

fn start(&self, state: &mut GraphState)

Source§

fn stop(&self, state: &mut GraphState)

Source§

fn teardown(&self, state: &mut GraphState)

Implementors§