Enum semver_parser::version::Identifier [−][src]
Helper enum for holding data of alphanumeric or numeric suffix identifiers.
This enum is used to hold suffix parts of pre and build fields of
Version struct. Theses suffixes may be either numeric or alphanumeric.
Examples
Parsing Version with pre-release part composed of two Identifiers:
use semver_parser::version; let version = version::parse("0.1.2-alpha1.0")?; let expected_pre = vec![ version::Identifier::AlphaNumeric(String::from("alpha1")), version::Identifier::Numeric(0), ]; assert_eq!(expected_pre, version.pre);
Variants
Numeric(u64)An identifier that's solely numbers.
AlphaNumeric(String)An identifier with letters and numbers.
Trait Implementations
impl Clone for Identifier[src]
impl Clone for Identifierfn clone(&self) -> Identifier[src]
fn clone(&self) -> IdentifierReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialOrd for Identifier[src]
impl PartialOrd for Identifierfn partial_cmp(&self, other: &Identifier) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Identifier) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Identifier) -> bool[src]
fn lt(&self, other: &Identifier) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Identifier) -> bool[src]
fn le(&self, other: &Identifier) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Identifier) -> bool[src]
fn gt(&self, other: &Identifier) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Identifier) -> bool[src]
fn ge(&self, other: &Identifier) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for Identifier[src]
impl Ord for Identifierfn cmp(&self, other: &Identifier) -> Ordering[src]
fn cmp(&self, other: &Identifier) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl Hash for Identifier[src]
impl Hash for Identifierfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for Identifier[src]
impl Debug for Identifierfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Identifier[src]
impl PartialEq for Identifierfn eq(&self, other: &Identifier) -> bool[src]
fn eq(&self, other: &Identifier) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Identifier) -> bool[src]
fn ne(&self, other: &Identifier) -> boolThis method tests for !=.
impl Eq for Identifier[src]
impl Eq for Identifierimpl Display for Identifier[src]
impl Display for IdentifierAuto Trait Implementations
impl Send for Identifier
impl Send for Identifierimpl Sync for Identifier
impl Sync for Identifier