Enum recital::version::Identifier [] [src]

pub enum Identifier {
    Number(u64),
    Alpha(String),
}

Represents an alphanumeric or numberic identifier.

An identifier in a semantic version number is a simple sequence of letters (a-z, A-Z), numbers (0-9), and hyphens that can appear in any order. Each identifier in a version number is separated by a dot (.). Knowing the difference between numeric and alphanumeric identifiers is important when version numbers are being compared.

Variants

Reprents a numeric identifier.

A numeric identifier, as the name implies, may only have numbers. During comparison with other identifiers, numberc identifiers are compared normally to each other. However, when a numeric identifier is compared to a numeric identifier, it will always be the lesser of the two.

Represents an alphanumeric identifier.

An alphanumeric identifier, as the name implies, may have letters and/or numbers. The letters are limited to a-z, A-Z, numbers to 0-9, and may also include one or more hyphens. During comparison with other identifiers, alphanumeric identifiers are compared normally to each other. However, when an alphanumeric identifier is compared to a numeric identifier, it will always be the greater of the two.

Trait Implementations

impl Clone for Identifier
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Identifier
[src]

Formats the value using the given formatter.

impl Eq for Identifier
[src]

impl Ord for Identifier
[src]

This method returns an Ordering between self and other. Read more

impl PartialEq for Identifier
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd for Identifier
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Display for Identifier
[src]

Formats the value using the given formatter. Read more

impl<'a> From<&'a str> for Identifier
[src]

Performs the conversion.

impl From<String> for Identifier
[src]

Performs the conversion.

impl From<f32> for Identifier
[src]

Performs the conversion.

impl From<f64> for Identifier
[src]

Performs the conversion.

impl From<i8> for Identifier
[src]

Performs the conversion.

impl From<i16> for Identifier
[src]

Performs the conversion.

impl From<i32> for Identifier
[src]

Performs the conversion.

impl From<i64> for Identifier
[src]

Performs the conversion.

impl From<u8> for Identifier
[src]

Performs the conversion.

impl From<u16> for Identifier
[src]

Performs the conversion.

impl From<u32> for Identifier
[src]

Performs the conversion.

impl From<u64> for Identifier
[src]

Performs the conversion.