pub struct Version {
pub epoch: u64,
pub release: Vec<u64>,
pub pre: Option<(String, u64)>,
pub post: Option<(String, u64)>,
pub dev: Option<(String, u64)>,
pub local: Option<Vec<LocalVersionPart>>,
}
Fields§
§epoch: u64
§release: Vec<u64>
§pre: Option<(String, u64)>
§post: Option<(String, u64)>
§dev: Option<(String, u64)>
§local: Option<Vec<LocalVersionPart>>
Implementations§
Source§impl Version
impl Version
pub fn cmpkey( &self, ) -> (u64, Vec<u64>, (&str, u64), (&str, u64), (&str, u64), &Vec<LocalVersionPart>)
pub fn release_without_trailing_zero(&self) -> Vec<u64>
pub fn prefix_str(&self) -> String
pub fn is_prerelease(&self) -> bool
pub fn is_postrelease(&self) -> bool
pub fn to_public(&self) -> Self
pub fn to_base(&self) -> Self
pub fn public_str(&self) -> String
pub fn canonicalize_str( &self, strip_trailing_zero: bool, with_local: bool, ) -> String
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