pub struct SchemaVersion {
pub major: u32,
pub minor: u32,
pub patch: u32,
}Expand description
Schema version identifier
Fields§
§major: u32Major version - breaking changes
minor: u32Minor version - new features, backward compatible
patch: u32Patch version - bug fixes
Implementations§
Source§impl SchemaVersion
impl SchemaVersion
Sourcepub fn is_compatible_with(&self, other: &SchemaVersion) -> bool
pub fn is_compatible_with(&self, other: &SchemaVersion) -> bool
Check if this version is compatible with another (same major version, this >= other)
Sourcepub fn is_newer_than(&self, other: &SchemaVersion) -> bool
pub fn is_newer_than(&self, other: &SchemaVersion) -> bool
Check if this version is newer than another
Sourcepub fn requires_migration_from(&self, other: &SchemaVersion) -> bool
pub fn requires_migration_from(&self, other: &SchemaVersion) -> bool
Check if this version requires migration from another
Trait Implementations§
Source§impl Clone for SchemaVersion
impl Clone for SchemaVersion
Source§fn clone(&self) -> SchemaVersion
fn clone(&self) -> SchemaVersion
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 SchemaVersion
impl Debug for SchemaVersion
Source§impl Default for SchemaVersion
impl Default for SchemaVersion
Source§impl<'de> Deserialize<'de> for SchemaVersion
impl<'de> Deserialize<'de> for SchemaVersion
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 SchemaVersion
impl Display for SchemaVersion
Source§impl Ord for SchemaVersion
impl Ord for SchemaVersion
Source§impl PartialEq for SchemaVersion
impl PartialEq for SchemaVersion
Source§impl PartialOrd for SchemaVersion
impl PartialOrd for SchemaVersion
Source§impl Serialize for SchemaVersion
impl Serialize for SchemaVersion
impl Copy for SchemaVersion
impl Eq for SchemaVersion
impl StructuralPartialEq for SchemaVersion
Auto Trait Implementations§
impl Freeze for SchemaVersion
impl RefUnwindSafe for SchemaVersion
impl Send for SchemaVersion
impl Sync for SchemaVersion
impl Unpin for SchemaVersion
impl UnwindSafe for SchemaVersion
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.