//! The trait and type representations use crate::experimental::trait_based::data::io::Inputs; use super::data::io::Outputs; pub(crate) trait PipelineElement { /// return a static runner function pointer to avoid dynamic dispatch during pipeline execution - Types MUST match the signature fn runner(&self) -> fn(&Inputs) -> Outputs; /// return the signature of the element fn signature(&self) -> ElementSignature; } /// Type signature for an element used for static checking pub(crate) struct ElementSignature { pub inputs: Vec, pub outputs: Vec, } /// Data type enum #[derive(Clone, Copy, PartialEq, Eq, Debug)] pub enum DataType { String, Int, }