Enum alpm_types::PkgType
source · #[non_exhaustive]
pub enum PkgType {
Debug,
Package,
Source,
Split,
}Expand description
The type of a package
Examples
use std::str::FromStr;
use alpm_types::PkgType;
// create PkgType from str
assert_eq!(PkgType::from_str("pkg"), Ok(PkgType::Package));
// format as String
assert_eq!("debug", format!("{}", PkgType::Debug));
assert_eq!("pkg", format!("{}", PkgType::Package));
assert_eq!("src", format!("{}", PkgType::Source));
assert_eq!("split", format!("{}", PkgType::Split));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Debug
a debug package
Package
a single (non-split) package
Source
a source-only package
Split
one split package out of a set of several