prowocessing: add trait based experiment
This commit is contained in:
parent
d9a07c8898
commit
26996fbd00
4 changed files with 356 additions and 3 deletions
|
@ -56,17 +56,20 @@ fn main() {
|
|||
|
||||
mod dev {
|
||||
use clap::Subcommand;
|
||||
use prowocessing::experimental::enum_based::{Pipeline, PipelineBuilder};
|
||||
use prowocessing::experimental::trait_based::DataType;
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub(crate) enum DevCommands {
|
||||
Enums { test_str: String },
|
||||
Add { num0: i32, num1: i32 },
|
||||
}
|
||||
|
||||
impl DevCommands {
|
||||
pub fn run(self) {
|
||||
match self {
|
||||
DevCommands::Enums { test_str } => {
|
||||
use prowocessing::experimental::enum_based::PipelineBuilder;
|
||||
|
||||
let upr = PipelineBuilder::new()
|
||||
.insert(prowocessing::experimental::enum_based::Instruction::Uppercase)
|
||||
.build();
|
||||
|
@ -77,6 +80,15 @@ mod dev {
|
|||
println!("Upr: {}", upr.run(test_str.clone()));
|
||||
println!("Lwr: {}", lwr.run(test_str.clone()));
|
||||
}
|
||||
DevCommands::Add { num0, num1 } => {
|
||||
use prowocessing::experimental::trait_based::PipelineBuilder;
|
||||
|
||||
let pipe = PipelineBuilder::new().add(1).stringify().build();
|
||||
println!(
|
||||
"{:?}",
|
||||
pipe.run(vec![num0.into(), num1.into()].into()).into_inner()[0]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue