wingfoil 3.0.1

graph based stream processing framework
Documentation
use crate::graph::GraphState;
use crate::types::{IntoNode, MutableNode, Node, UpStreams};
use std::rc::Rc;

struct NeverTickNode {}

impl MutableNode for NeverTickNode {
    fn cycle(&mut self, _: &mut GraphState) -> anyhow::Result<bool> {
        Ok(false)
    }

    fn upstreams(&self) -> UpStreams {
        UpStreams::default()
    }
}

/// Produces a [Node] that never ticks.
#[must_use]
pub fn never() -> Rc<dyn Node> {
    NeverTickNode {}.into_node()
}