cli: add dev command for enums experiment
This commit is contained in:
parent
56ec11e143
commit
db9228dec4
4 changed files with 43 additions and 4 deletions
|
@ -7,7 +7,7 @@ use experimental::enum_based::{Instruction, PipelineBuilder};
|
|||
|
||||
/// just some experiments, to test whether the architecture i want is even possible (or how to do it). probably temporary.
|
||||
/// Gonna first try string processing...
|
||||
mod experimental {
|
||||
pub mod experimental {
|
||||
pub mod enum_based {
|
||||
pub enum Instruction {
|
||||
Uppercase,
|
||||
|
@ -41,6 +41,7 @@ mod experimental {
|
|||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn insert(mut self, instr: Instruction) -> Self {
|
||||
self.pipeline.push(instr);
|
||||
self
|
||||
|
@ -66,6 +67,12 @@ mod experimental {
|
|||
Pipeline { pipeline: res }
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for PipelineBuilder {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue