Struct terraform_version::Version
source · pub struct Version {
pub numeric_identifiers: NumericIdentifiers,
pub suffix: Option<String>,
}Fields§
§numeric_identifiers: NumericIdentifiersSeries of numbers, usually representing major, minor and patch (when semantic versioning is respected).
suffix: Option<String>Equivalent of prerelease and/or build metadata in semantic versioning syntax.
Implementations§
source§impl Version
impl Version
sourcepub fn parse(text: &str) -> Result<Self, Error>
pub fn parse(text: &str) -> Result<Self, Error>
Try to create Version from given string.
If the string contains a - character, it is split in two, the first part will be considered as the numeric identifier and the 2nd one as suffix.
sourcepub fn matches(&self, vr: &VersionRequirement) -> bool
pub fn matches(&self, vr: &VersionRequirement) -> bool
Evaluate whether self satisfies the given VersionRequirement.
Trait Implementations§
source§impl Ord for Version
impl Ord for Version
source§impl PartialEq<Version> for Version
impl PartialEq<Version> for Version
source§impl PartialOrd<Version> for Version
impl PartialOrd<Version> for Version
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more