#[non_exhaustive]pub enum PackageType {
Debug,
Package,
Source,
Split,
}
Expand description
The type of a package
§Examples
use std::str::FromStr;
use alpm_types::PackageType;
// create PackageType from str
assert_eq!(PackageType::from_str("pkg"), Ok(PackageType::Package));
// format as String
assert_eq!("debug", format!("{}", PackageType::Debug));
assert_eq!("pkg", format!("{}", PackageType::Package));
assert_eq!("src", format!("{}", PackageType::Source));
assert_eq!("split", format!("{}", PackageType::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
Trait Implementations§
Source§impl Clone for PackageType
impl Clone for PackageType
Source§fn clone(&self) -> PackageType
fn clone(&self) -> PackageType
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PackageType
impl Debug for PackageType
Source§impl Display for PackageType
impl Display for PackageType
Source§impl FromStr for PackageType
impl FromStr for PackageType
Source§impl PartialEq for PackageType
impl PartialEq for PackageType
Source§impl Serialize for PackageType
impl Serialize for PackageType
Source§impl TryFrom<&str> for PackageType
impl TryFrom<&str> for PackageType
impl Copy for PackageType
impl Eq for PackageType
impl StructuralPartialEq for PackageType
Auto Trait Implementations§
impl Freeze for PackageType
impl RefUnwindSafe for PackageType
impl Send for PackageType
impl Sync for PackageType
impl Unpin for PackageType
impl UnwindSafe for PackageType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more