mirror of
https://forge.katzen.cafe/katzen-cafe/iowo.git
synced 2026-01-17 00:53:05 +01:00
prowocessing: refactor trait based experiment to individual files
This commit is contained in:
parent
2d537cc4ee
commit
98f6af78be
10 changed files with 362 additions and 341 deletions
19
crates/prowocessing/src/experimental/trait_based/element.rs
Normal file
19
crates/prowocessing/src/experimental/trait_based/element.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
use crate::experimental::trait_based::data::io::Inputs;
|
||||
|
||||
use super::data::io::Outputs;
|
||||
|
||||
pub(crate) trait PipelineElement {
|
||||
fn runner(&self) -> fn(&Inputs) -> Outputs;
|
||||
fn signature(&self) -> ElementIo;
|
||||
}
|
||||
|
||||
pub(crate) struct ElementIo {
|
||||
pub inputs: Vec<DataType>,
|
||||
pub outputs: Vec<DataType>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
||||
pub enum DataType {
|
||||
String,
|
||||
Int,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue