apple_bundles/lib.rs
1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
5mod directory_bundle;
6pub use directory_bundle::*;
7mod macos_application_bundle;
8pub use macos_application_bundle::*;
9
10/// Denotes the type of a bundle.
11#[derive(Clone, Copy, Debug, Eq, PartialEq)]
12pub enum BundlePackageType {
13 /// Application bundle.
14 App,
15 /// Framework bundle.
16 Framework,
17 /// Generic bundle.
18 Bundle,
19}
20
21impl ToString for BundlePackageType {
22 fn to_string(&self) -> String {
23 match self {
24 Self::App => "APPL",
25 Self::Framework => "FMWK",
26 Self::Bundle => "BNDL",
27 }
28 .to_string()
29 }
30}