pub enum VersionOrSoname {
Version(PackageVersion),
Soname(SharedObjectName),
}Expand description
Provides either a PackageVersion or a SharedObjectName.
This enum is used when creating SonameV1.
Variants§
Trait Implementations§
Source§impl AlpmParser for VersionOrSoname
impl AlpmParser for VersionOrSoname
Source§fn parser<'a>(input: &mut Input<'a>) -> PResult<'a, Self>
fn parser<'a>(input: &mut Input<'a>) -> PResult<'a, Self>
Recognizes a PackageVersion or SharedObjectName in a string slice.
First attempts to recognize a SharedObjectName and if that fails, falls back to
recognizing a PackageVersion.
§Errors
Returns an error if input does not begin with a valid SharedObjectName or
PackageVersion.
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 VersionOrSoname
impl Clone for VersionOrSoname
Source§impl Debug for VersionOrSoname
impl Debug for VersionOrSoname
Source§impl Display for VersionOrSoname
impl Display for VersionOrSoname
impl Eq for VersionOrSoname
Source§impl FromStr for VersionOrSoname
impl FromStr for VersionOrSoname
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Creates a VersionOrSoname from a string slice.
Delegates to VersionOrSoname::parser.
§Errors
Returns an error if VersionOrSoname::parser fails.
Source§impl PartialEq for VersionOrSoname
impl PartialEq for VersionOrSoname
impl StructuralPartialEq for VersionOrSoname
Auto Trait Implementations§
impl Freeze for VersionOrSoname
impl RefUnwindSafe for VersionOrSoname
impl Send for VersionOrSoname
impl Sync for VersionOrSoname
impl Unpin for VersionOrSoname
impl UnsafeUnpin for VersionOrSoname
impl UnwindSafe for VersionOrSoname
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