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§
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 AlpmParser for PackageType
impl AlpmParser for PackageType
Source§fn parser<'a>(input: &mut Input<'a>) -> PResult<'a, Self>
fn parser<'a>(input: &mut Input<'a>) -> PResult<'a, Self>
Recognizes a PackageType in a string slice.
§Errors
Returns an error if input does not begin with a valid variant
of PackageType.
Source§fn delimiter_error_context<'a, O, P>(
parser: P,
) -> impl Parser<Input<'a>, O, ErrMode<ParseStack<'a>>>where
P: Parser<Input<'a>, O, ErrMode<ParseStack<'a>>>,
fn delimiter_error_context<'a, O, P>(
parser: P,
) -> impl Parser<Input<'a>, O, ErrMode<ParseStack<'a>>>where
P: Parser<Input<'a>, O, ErrMode<ParseStack<'a>>>,
Attaches a winnow error context to the parser when a parse error is encountered. Read more
Source§impl Clone for PackageType
impl Clone for PackageType
Source§fn clone(&self) -> PackageType
fn clone(&self) -> PackageType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PackageType
Source§impl Debug for PackageType
impl Debug for PackageType
Source§impl Display for PackageType
impl Display for PackageType
impl Eq 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
impl StructuralPartialEq for PackageType
Source§impl TryFrom<&str> for PackageType
impl TryFrom<&str> 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 UnsafeUnpin for PackageType
impl UnwindSafe for PackageType
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<U> ParserUntil for Uwhere
U: AlpmParser,
impl<U> ParserUntil for Uwhere
U: AlpmParser,
Source§fn parser_until<'a, P>(
delimiter: P,
) -> impl Parser<LocatingSlice<&'a str>, U, ErrMode<ParseStack<'a>>>
fn parser_until<'a, P>( delimiter: P, ) -> impl Parser<LocatingSlice<&'a str>, U, ErrMode<ParseStack<'a>>>
Returns a [Parser] that parses Self until the given delimiter parser
matches.
Source§fn parser_until_eof<'a>(
input: &mut LocatingSlice<&'a str>,
) -> Result<Self, ErrMode<ParseStack<'a>>>
fn parser_until_eof<'a>( input: &mut LocatingSlice<&'a str>, ) -> Result<Self, ErrMode<ParseStack<'a>>>
Source§fn parser_until_line_ending<'a>(
input: &mut LocatingSlice<&'a str>,
) -> Result<Self, ErrMode<ParseStack<'a>>>
fn parser_until_line_ending<'a>( input: &mut LocatingSlice<&'a str>, ) -> Result<Self, ErrMode<ParseStack<'a>>>
Source§impl<U> ParserUntilInclusive for Uwhere
U: ParserUntil,
impl<U> ParserUntilInclusive for Uwhere
U: ParserUntil,
Source§fn parser_until_inclusive<'a, P>(
delimiter: P,
) -> impl Parser<LocatingSlice<&'a str>, U, ErrMode<ParseStack<'a>>>
fn parser_until_inclusive<'a, P>( delimiter: P, ) -> impl Parser<LocatingSlice<&'a str>, U, ErrMode<ParseStack<'a>>>
Returns a [Parser] that parses the whole input and consumes the given delimiter parser.
Delegates to ParserUntil::parser_until and consumes the delimiter.
Source§fn parser_until_line_ending_inclusive<'a>(
input: &mut LocatingSlice<&'a str>,
) -> Result<Self, ErrMode<ParseStack<'a>>>
fn parser_until_line_ending_inclusive<'a>( input: &mut LocatingSlice<&'a str>, ) -> Result<Self, ErrMode<ParseStack<'a>>>
Returns a [
Parser] that parses until the end of line and fully consumes it. Read more