pub struct ModuleVersion {
pub major: u32,
pub minor: u32,
pub patch: u32,
}Expand description
Semantic version representation.
Fields§
§major: u32Major version (breaking changes).
minor: u32Minor version (new features).
patch: u32Patch version (bug fixes).
Implementations§
Source§impl ModuleVersion
impl ModuleVersion
Sourcepub fn is_compatible_with(&self, other: &ModuleVersion) -> bool
pub fn is_compatible_with(&self, other: &ModuleVersion) -> bool
Checks if this version is compatible with another. Compatible means same major version.
Sourcepub fn is_greater_than(&self, other: &ModuleVersion) -> bool
pub fn is_greater_than(&self, other: &ModuleVersion) -> bool
Checks if this version is greater than another.
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 Hash for ModuleVersion
impl Hash 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