38 lines
635 B
Rust
38 lines
635 B
Rust
|
|
|
||
|
|
use std::collections::HashMap;
|
||
|
|
|
||
|
|
|
||
|
|
#[derive(Debug, Clone)]
|
||
|
|
pub enum ConfigValue {
|
||
|
|
String(String),
|
||
|
|
I64(i64),
|
||
|
|
U64(u64),
|
||
|
|
F64(f64),
|
||
|
|
Bool(bool),
|
||
|
|
Vector(Vec<ConfigValue>),
|
||
|
|
Dictionary(HashMap<String, ConfigValue>)
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone)]
|
||
|
|
pub struct StageResult {
|
||
|
|
pub name: String,
|
||
|
|
pub config: Option<HashMap<String, ConfigValue>>,
|
||
|
|
pub resuts: Option<HashMap<String, ConfigValue>>,
|
||
|
|
pub error: Option<String>
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Debug, Clone)]
|
||
|
|
pub enum StageAction {
|
||
|
|
Back,
|
||
|
|
None,
|
||
|
|
Next(StageResult),
|
||
|
|
Abort(StageResult),
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
pub struct KiraConfig {
|
||
|
|
pub config_trail: Vec<StageResult>,
|
||
|
|
}
|
||
|
|
|
||
|
|
|