diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2024-04-20 14:28:05 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2024-04-20 14:38:17 +0200 |
commit | e9bf0fc40c0eb7e9d4228b804d62f31b0a136528 (patch) | |
tree | 7872f587782d5635eadbf82ae861d474d4da2efe /crates/common/src/types.rs | |
parent | 35e68444dd5e9d3d5fc39409c48be6eb3fa05e07 (diff) | |
download | rebel-e9bf0fc40c0eb7e9d4228b804d62f31b0a136528.tar rebel-e9bf0fc40c0eb7e9d4228b804d62f31b0a136528.zip |
Rename directories to match crate names
Diffstat (limited to 'crates/common/src/types.rs')
-rw-r--r-- | crates/common/src/types.rs | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/crates/common/src/types.rs b/crates/common/src/types.rs deleted file mode 100644 index 2a06275..0000000 --- a/crates/common/src/types.rs +++ /dev/null @@ -1,54 +0,0 @@ -use std::{ - collections::{HashMap, HashSet}, - fmt::Display, -}; - -use serde::{Deserialize, Serialize}; - -use crate::string_hash::*; - -#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, Hash)] -pub struct TaskID { - pub recipe: String, - pub task: String, -} - -impl Display for TaskID { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}::{}", self.recipe, self.task) - } -} - -#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, Hash)] -#[serde(rename_all = "snake_case")] -pub enum Dependency { - Fetch { - name: String, - target_dir: String, - sha256: StringHash, - }, - Task { - output: ArchiveHash, - path: String, - }, -} - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct Task { - pub label: String, - pub command: String, - pub workdir: String, - pub rootfs: ArchiveHash, - pub ancestors: Vec<LayerHash>, - pub depends: HashSet<Dependency>, - pub outputs: HashMap<String, String>, - pub pins: HashMap<ArchiveHash, String>, - pub force_run: bool, -} - -#[derive(Clone, Debug, Deserialize, Serialize, Default)] -pub struct TaskOutput { - pub input_hash: Option<InputHash>, - pub layer: Option<LayerHash>, - pub outputs: HashMap<String, ArchiveHash>, -} |