Files
kira-installer/src/stage.rs
T

57 lines
1.5 KiB
Rust
Raw Normal View History

// <Kira Installer - universal Linux installer.>
// Copyright (C) <2026> <Kira Foundation>
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
/*
This file contains basic enums and structs to be used with stages.
*/
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>,
}