1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

mod directory_bundle;
pub use directory_bundle::*;
mod macos_application_bundle;
pub use macos_application_bundle::*;

/// Denotes the type of a bundle.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum BundlePackageType {
    /// Application bundle.
    App,
    /// Framework bundle.
    Framework,
    /// Generic bundle.
    Bundle,
}

impl ToString for BundlePackageType {
    fn to_string(&self) -> String {
        match self {
            Self::App => "APPL",
            Self::Framework => "FMWK",
            Self::Bundle => "BNDL",
        }
        .to_string()
    }
}