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(input: &mut &str) -> ModalResult<Self>
fn parser(input: &mut &str) -> ModalResult<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§impl Clone for VersionOrSoname
impl Clone for VersionOrSoname
Source§fn clone(&self) -> VersionOrSoname
fn clone(&self) -> VersionOrSoname
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VersionOrSoname
impl Debug for VersionOrSoname
Source§impl Display for VersionOrSoname
impl Display 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
Source§fn eq(&self, other: &VersionOrSoname) -> bool
fn eq(&self, other: &VersionOrSoname) -> bool
self and other values to be equal, and is used by ==.impl Eq 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
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<&'a str, U, ErrMode<ContextError>>
fn parser_until<'a, P>( delimiter: P, ) -> impl Parser<&'a str, U, ErrMode<ContextError>>
Returns a [Parser] that parses Self until the given delimiter parser
matches.
§Note
Does not consume the delimiter.
Source§fn parser_until_eof(input: &mut &str) -> Result<Self, ErrMode<ContextError>>
fn parser_until_eof(input: &mut &str) -> Result<Self, ErrMode<ContextError>>
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<&'a str, U, ErrMode<ContextError>>
fn parser_until_inclusive<'a, P>( delimiter: P, ) -> impl Parser<&'a str, U, ErrMode<ContextError>>
Returns a [Parser] that parses the whole input and consumes the given delimiter parser.
Delegates to ParserUntil::parser_until and consumes the delimiter.