Struct mitrid_core::utils::version::Version[][src]

pub struct Version {
    pub major: u32,
    pub minor: u32,
    pub patch: u32,
    pub prerelease: String,
    pub buildmeta: String,
}

Type used to represent a Semver version.

Fields

Semver version major. Used for API breaking changes.

Semver version minor. Used for backward-compatible API changes.

Semver version patch. Used for changes not affecting the API.

Semver version prerelease. Used in prereleases. Optional.

Semver version buildmeta. Build information. Optional.

Methods

impl Version
[src]

Creates a new Semver version.

Check a Semver numeric version (major, minor or patch).

Check a Semver prerelease version.

Check a buildmeta prerelease version.

Check a semver version.

Parse a string as a Version.

Stringify the Version.

Returns if this Version is compatible to an other.

Trait Implementations

impl Clone for Version
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Version
[src]

Formats the value using the given formatter. Read more

impl Hash for Version
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Default for Version
[src]

Returns the "default value" for a type. Read more

impl PartialEq for Version
[src]

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

This method tests for !=.

impl Eq for Version
[src]

impl Display for Version
[src]

Formats the value using the given formatter. Read more

impl PartialOrd for Version
[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 Ord for Version
[src]

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

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Sizable for Version
[src]

Returns the size of the implementor.

impl Checkable for Version
[src]

Checks the implementor.

Check asynchronously the implementor.

impl Datable for Version
[src]

impl Serializable for Version
[src]

Serializes the implementor into a json string.

Deserializes a json string into the implementor type.

Serializes the implementor into a byte vector.

Deserializes a byte vector into the implementor type.

Serializes the implementor into a hex string.

Deserializes an hex string into the implementor type.

Auto Trait Implementations

impl Send for Version

impl Sync for Version