deb_rs/file/
data_types.rs

1use crate::shared::PackageWithVersion;
2
3#[derive(Debug, Clone, PartialEq, Eq)]
4pub struct PathItem {
5    pub real: String,
6    pub move_to: String,
7}
8
9#[derive(Debug, Clone, PartialEq, Eq, Copy)]
10pub enum Version {
11    V1_0,
12    V2_0,
13    VUnknown,
14}
15
16/**
17 * Type doc: <https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-binarycontrolfiles>
18 * YAML format
19*/
20#[derive(Debug, Clone, PartialEq, Eq)]
21pub struct Control {
22    pub package: String,
23    pub source: Option<String>,
24    pub version: String,
25    pub section: Option<String>,
26    pub priority: Option<String>,
27    pub architecture: String,
28    pub essential: Option<String>,
29    pub install_size: Option<u64>, // There could be a better value for this, however rust-yaml outputs it as i64
30    pub maintainer: String,
31    pub description: String,
32    pub homepage: Option<String>,
33    pub built_using: Option<String>,
34    // Depends et al: <https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps>
35    pub depends: Vec<PackageWithVersion>,
36    pub pre_depends: Vec<PackageWithVersion>,
37    pub recommends: Vec<PackageWithVersion>,
38    pub suggests: Vec<PackageWithVersion>,
39    pub enhances: Vec<PackageWithVersion>,
40    pub breaks: Vec<PackageWithVersion>,
41    pub conflicts: Vec<PackageWithVersion>,
42}