pub struct Version {
pub major: u64,
pub minor: u64,
pub patch: u64,
}Expand description
A parsed CLI version (major.minor.patch). Ord compares numerically, so a
caller can gate a feature on a minimum version; Hash lets it key a map (e.g.
a per-version capability cache).
Fields§
§major: u64Major component (2 in 2.54.0).
minor: u64Minor component.
patch: u64Patch component (0 when the binary reports only major.minor).
Trait Implementations§
impl Copy for Version
impl Eq for Version
Source§impl Ord for Version
impl Ord for Version
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Version
impl PartialOrd for Version
impl StructuralPartialEq 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 UnsafeUnpin 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