pub struct SchemaVersion {
pub major: u32,
pub minor: u32,
}Expand description
Schema version information embedded in snapshots.
This allows consumers to detect and handle format changes gracefully.
Fields§
§major: u32Major version - breaking changes increment this.
minor: u32Minor version - backwards-compatible additions increment this.
Implementations§
Source§impl SchemaVersion
impl SchemaVersion
Sourcepub fn is_compatible(&self) -> bool
pub fn is_compatible(&self) -> bool
Check if this version is compatible with the current library version.
Returns true if the major version matches (minor differences are OK).
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 Hash for SchemaVersion
impl Hash for SchemaVersion
Source§impl PartialEq for SchemaVersion
impl PartialEq 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