Struct debversion::Version
source · pub struct Version {
pub epoch: Option<u32>,
pub upstream_version: String,
pub debian_revision: Option<String>,
}Expand description
A Debian version string
Fields§
§epoch: Option<u32>§upstream_version: String§debian_revision: Option<String>Implementations§
source§impl Version
impl Version
sourcepub fn canonicalize(&self) -> Version
pub fn canonicalize(&self) -> Version
Return canonicalized version of this version
Examples
use debversion::Version;
assert_eq!("1.0-0".parse::<Version>().unwrap().canonicalize(), "1.0".parse::<Version>().unwrap());
assert_eq!("1.0-1".parse::<Version>().unwrap().canonicalize(), "1.0-1".parse::<Version>().unwrap());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 moreimpl Eq for Version
Auto Trait Implementations§
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