pub struct BundleVersion {
pub major: u32,
pub minor: u32,
pub patch: u32,
pub build: Option<u32>,
}Expand description
Semantic version for bundles.
Fields§
§major: u32§minor: u32§patch: u32§build: Option<u32>Implementations§
Source§impl BundleVersion
impl BundleVersion
pub fn new(major: u32, minor: u32, patch: u32) -> Self
pub fn with_build(self, build: u32) -> Self
Sourcepub fn is_compatible_with(&self, min: &BundleVersion) -> bool
pub fn is_compatible_with(&self, min: &BundleVersion) -> bool
Check if this version is compatible with a minimum required version. Compatible if major matches and self >= min.
Trait Implementations§
Source§impl Clone for BundleVersion
impl Clone for BundleVersion
Source§fn clone(&self) -> BundleVersion
fn clone(&self) -> BundleVersion
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 BundleVersion
impl Debug for BundleVersion
Source§impl<'de> Deserialize<'de> for BundleVersion
impl<'de> Deserialize<'de> for BundleVersion
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for BundleVersion
impl Display for BundleVersion
Source§impl Ord for BundleVersion
impl Ord for BundleVersion
Source§impl PartialEq for BundleVersion
impl PartialEq for BundleVersion
Source§impl PartialOrd for BundleVersion
impl PartialOrd for BundleVersion
Source§impl Serialize for BundleVersion
impl Serialize for BundleVersion
impl Eq for BundleVersion
impl StructuralPartialEq for BundleVersion
Auto Trait Implementations§
impl Freeze for BundleVersion
impl RefUnwindSafe for BundleVersion
impl Send for BundleVersion
impl Sync for BundleVersion
impl Unpin for BundleVersion
impl UnsafeUnpin for BundleVersion
impl UnwindSafe for BundleVersion
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