Struct upm_lib::Version
[−]
[src]
pub struct Version { /* fields omitted */ }
A simple representation of a version string. For semantic versioning Steve Klabnik's semver crate is preferable. But non-semantic versioning is also permitted in this struct.
Methods
impl Version
[src]
fn get_representation(self) -> String
[src]
Get the string representation of the version
fn set_representation(&mut self, val: String)
[src]
Change the version along with checking if this new version appears to be semantic
fn is_semantic(representation: &str) -> bool
[src]
Check if a representation appears to be semantic versioning
fn set_semantic(&mut self, val: bool) -> Result<(), Error>
[src]
Explicitly set whether the version is semantic. If the version string doesn't pass is_semantic, then it won't set semantic to true and will return false.
fn get_semantic(self) -> bool
[src]
Is this a semantic version?