Struct version_lp::Version

source ·
pub struct Version { /* private fields */ }

Implementations

creates a new version directly.

creates a new wildcard version,“*”, which matches compatible with everything

creates a version from a string

creates a disconnected copy

returns the largest number in the list of strings assumes they all aren’t wildcards (doesn’t process wildcards, just skips them from the list)

checks if the version has a wildcard in it

checks if the version is all numbers

returns true if 100% wild

checks compatibility between versions

uses wildcards in the comparision. if the self version has wildcards then it will not be compatible with anything else since it is not an actual version

returns a string formated as “x.x.x.x”

returns a string formated as “x_x_x_x”

Trait Implementations

prints “Version(x.x.x)”

Deserialize this value from the given Serde deserializer. Read more

prints “x.x.x”

Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
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
Restrict a value to a certain interval. Read more

in order for a version to be equal all the parts need to be equal. and all parts need to be numbers == comparisons will always yield false when comparing against a pattern.

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
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
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Marks self as using is_human_readable == true
Marks self as using is_human_readable == false

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.