pub trait MutableNode {
// Required method
fn cycle(&mut self, state: &mut GraphState) -> bool;
// Provided methods
fn upstreams(&self) -> UpStreams { ... }
fn setup(&mut self, state: &mut GraphState) { ... }
fn start(&mut self, state: &mut GraphState) { ... }
fn stop(&mut self, state: &mut GraphState) { ... }
fn teardown(&mut self, state: &mut GraphState) { ... }
fn type_name(&self) -> String { ... }
}Expand description
Implement this trait create your own Node.
Required Methods§
Sourcefn cycle(&mut self, state: &mut GraphState) -> bool
fn cycle(&mut self, state: &mut GraphState) -> bool
Called by the graph when it determines that this node is required to be cycled.
Provided Methods§
Sourcefn setup(&mut self, state: &mut GraphState)
fn setup(&mut self, state: &mut GraphState)
called by the graph after wiring and before start
Sourcefn start(&mut self, state: &mut GraphState)
fn start(&mut self, state: &mut GraphState)
Called by the graph after wiring and before the first cycle. Can be used to request an initial callback.
Sourcefn stop(&mut self, state: &mut GraphState)
fn stop(&mut self, state: &mut GraphState)
Called by the graph after the last cycle. Can be used to clean up resources.