pub struct Version {
pub epoch: Option<u64>,
pub components: Vec<String>,
pub pre_release: Option<String>,
pub build_metadata: Option<String>,
}Expand description
§Example
parts of version can be ignored
use std::cmp::Ordering::Greater;
use h_version::Version;
let version1 = Version::parse("1:123.543.57-alpha+001");
let version2 = Version::parse("1:123.543.56-beta+002");
assert_eq!(version1.cmp(&version2),Greater);Fields§
§epoch: Option<u64>§components: Vec<String>§pre_release: Option<String>§build_metadata: Option<String>Implementations§
Trait Implementations§
Source§impl Ord for Version
impl Ord for Version
Source§impl PartialOrd for Version
impl PartialOrd for Version
impl Eq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more