MutableNode

Trait MutableNode 

Source
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§

Source

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§

Source

fn upstreams(&self) -> UpStreams

Called by the graph at wiring time.

Source

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

called by the graph after wiring and before start

Source

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.

Source

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

Called by the graph after the last cycle. Can be used to clean up resources.

Source

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

Source

fn type_name(&self) -> String

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

fn upstreams(&self) -> UpStreams

Source§

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

Source§

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

Implementors§

Source§

impl<T: Element + Hash + Eq> MutableNode for CallBackStream<T>