pub struct ModuleVersion {
pub major: u32,
pub minor: u32,
pub patch: u32,
}Expand description
A semantic version for a module.
Fields§
§major: u32Major version number.
minor: u32Minor version number.
patch: u32Patch version number.
Implementations§
Source§impl ModuleVersion
impl ModuleVersion
Sourcepub fn is_compatible_with(&self, other: &Self) -> bool
pub fn is_compatible_with(&self, other: &Self) -> bool
Whether this version is backwards compatible with other.
Compatible if same major version and this is at least as new.
Trait Implementations§
Source§impl Clone for ModuleVersion
impl Clone for ModuleVersion
Source§fn clone(&self) -> ModuleVersion
fn clone(&self) -> ModuleVersion
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 ModuleVersion
impl Debug for ModuleVersion
Source§impl Display for ModuleVersion
impl Display for ModuleVersion
Source§impl Ord for ModuleVersion
impl Ord for ModuleVersion
Source§fn cmp(&self, other: &ModuleVersion) -> Ordering
fn cmp(&self, other: &ModuleVersion) -> Ordering
1.21.0 · 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 PartialEq for ModuleVersion
impl PartialEq for ModuleVersion
Source§impl PartialOrd for ModuleVersion
impl PartialOrd for ModuleVersion
impl Eq for ModuleVersion
impl StructuralPartialEq for ModuleVersion
Auto Trait Implementations§
impl Freeze for ModuleVersion
impl RefUnwindSafe for ModuleVersion
impl Send for ModuleVersion
impl Sync for ModuleVersion
impl Unpin for ModuleVersion
impl UnsafeUnpin for ModuleVersion
impl UnwindSafe for ModuleVersion
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