about summary refs log blame commit diff
path: root/tvix/derivation/src/output.rs
blob: 0d764011fc1cd5a7abe36a1471bdb39e4ba17894 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                          
use serde::{Deserialize, Serialize};

// This function is required by serde to deserialize files
// with missing keys.
fn default_resource() -> String {
    "".to_string()
}

#[derive(Serialize, Deserialize)]
pub struct Output {
    pub path: String,
    #[serde(default = "default_resource")]
    pub hash_algorithm: String,
    #[serde(default = "default_resource")]
    pub hash: String,
}