#[non_exhaustive]pub struct CargoVersion {
pub major: u32,
pub minor: u32,
pub patch: u32,
pub nightly: bool,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.major: u32§minor: u32§patch: u32§nightly: boolImplementations§
Source§impl CargoVersion
impl CargoVersion
Sourcepub fn major_minor(&self) -> (u32, u32)
pub fn major_minor(&self) -> (u32, u32)
Returns the pair of the major and minor versions.
This is useful for comparing versions: version.major_minor() < (1, 70)
Trait Implementations§
Source§impl Clone for CargoVersion
impl Clone for CargoVersion
Source§fn clone(&self) -> CargoVersion
fn clone(&self) -> CargoVersion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CargoVersion
impl Debug for CargoVersion
Source§impl PartialEq for CargoVersion
impl PartialEq for CargoVersion
impl Copy for CargoVersion
impl Eq for CargoVersion
impl StructuralPartialEq for CargoVersion
Auto Trait Implementations§
impl Freeze for CargoVersion
impl RefUnwindSafe for CargoVersion
impl Send for CargoVersion
impl Sync for CargoVersion
impl Unpin for CargoVersion
impl UnsafeUnpin for CargoVersion
impl UnwindSafe for CargoVersion
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