pub enum Identifier<'a> {
Numeric(&'a str),
AlphaNumeric(&'a str),
}Expand description
One pre-release or build identifier, borrowed from its version.
Variants§
Numeric(&'a str)
All digits, compared numerically.
AlphaNumeric(&'a str)
Contains a letter or hyphen, compared in ASCII order.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for Identifier<'a>
impl<'a> Clone for Identifier<'a>
impl<'a> Copy for Identifier<'a>
Source§impl<'a> Debug for Identifier<'a>
impl<'a> Debug for Identifier<'a>
Source§impl Display for Identifier<'_>
impl Display for Identifier<'_>
impl<'a> Eq for Identifier<'a>
Source§impl<'a> Hash for Identifier<'a>
impl<'a> Hash for Identifier<'a>
Source§impl Ord for Identifier<'_>
impl Ord for Identifier<'_>
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Numeric identifiers compare numerically (ignoring leading zeroes, which builds may carry) and sort before alphanumeric ones, which compare in ASCII order.
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<'a> PartialEq for Identifier<'a>
impl<'a> PartialEq for Identifier<'a>
Source§impl PartialOrd for Identifier<'_>
impl PartialOrd for Identifier<'_>
impl<'a> StructuralPartialEq for Identifier<'a>
Auto Trait Implementations§
impl<'a> Forget for Identifier<'a>
impl<'a> Freeze for Identifier<'a>
impl<'a> Move for Identifier<'a>
impl<'a> RefUnwindSafe for Identifier<'a>
impl<'a> Send for Identifier<'a>
impl<'a> Sync for Identifier<'a>
impl<'a> Unpin for Identifier<'a>
impl<'a> UnsafeUnpin for Identifier<'a>
impl<'a> UnwindSafe for Identifier<'a>
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