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§
Sourcefn cycle(&self, state: &mut GraphState) -> bool
fn cycle(&self, state: &mut GraphState) -> bool
This is like Node::cycle but doesn’t require mutable self
fn setup(&self, state: &mut GraphState)
fn start(&self, state: &mut GraphState)
fn stop(&self, state: &mut GraphState)
fn teardown(&self, state: &mut GraphState)
Trait Implementations§
Source§impl NodeOperators for dyn Node
impl NodeOperators for dyn Node
Source§fn count(self: &Rc<Self>) -> Rc<dyn Stream<u64>>
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>>
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>>
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>>
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<()>
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