pub struct Version {
pub major: u32,
pub minor: u32,
pub patch: u32,
pub build: u32,
}Fields§
§major: u32§minor: u32§patch: u32§build: u32Implementations§
Source§impl Version
impl Version
pub fn from_client_exe(version: &str) -> Version
Sourcepub fn try_from_client_exe(version: &str) -> Option<Version>
pub fn try_from_client_exe(version: &str) -> Option<Version>
Fallible variant of Version::from_client_exe that returns None
instead of panicking when the version string is malformed (e.g. read
from a corrupt or truncated replay).
pub fn to_path(&self) -> String
Sourcepub const fn base(major: u32, minor: u32, patch: u32) -> Version
pub const fn base(major: u32, minor: u32, patch: u32) -> Version
A base version (major, minor, patch) with no build component. Useful for
keying version-gated tables, where entries take effect at a friendly
version regardless of build. Compare against a full version with
Self::is_at_least, which ignores the build field.
pub fn is_at_least(&self, other: &Version) -> bool
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