#[non_exhaustive]pub struct RustcVersion {
pub major: u32,
pub minor: u32,
pub patch: Option<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: Option<u32>§nightly: boolImplementations§
Source§impl RustcVersion
impl RustcVersion
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 RustcVersion
impl Clone for RustcVersion
Source§fn clone(&self) -> RustcVersion
fn clone(&self) -> RustcVersion
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 RustcVersion
impl Debug for RustcVersion
Source§impl PartialEq for RustcVersion
impl PartialEq for RustcVersion
impl Copy for RustcVersion
impl Eq for RustcVersion
impl StructuralPartialEq for RustcVersion
Auto Trait Implementations§
impl Freeze for RustcVersion
impl RefUnwindSafe for RustcVersion
impl Send for RustcVersion
impl Sync for RustcVersion
impl Unpin for RustcVersion
impl UnwindSafe for RustcVersion
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