pub enum Compatibility {
Exact,
Forward {
reader_version: u32,
writer_version: u32,
},
MigrationRequired {
reader_version: u32,
writer_version: u32,
},
Backward {
reader_version: u32,
writer_version: u32,
},
Unknown {
writer_version: String,
},
}Expand description
Outcome of a schema compatibility check.
Variants§
Exact
Versions match exactly.
Forward
Reader is newer than writer — forward compatible (reader can read older data).
MigrationRequired
Older data lacks required semantics and needs an explicit migration.
Backward
Writer is newer than reader — incompatible (needs migration).
Unknown
Version string doesn’t match expected format for this schema kind.
Implementations§
Source§impl Compatibility
impl Compatibility
Sourcepub fn is_compatible(&self) -> bool
pub fn is_compatible(&self) -> bool
Whether the reader can process data from the writer.
Trait Implementations§
Source§impl Clone for Compatibility
impl Clone for Compatibility
Source§impl Debug for Compatibility
impl Debug for Compatibility
Source§impl Display for Compatibility
impl Display for Compatibility
impl Eq for Compatibility
Source§impl PartialEq for Compatibility
impl PartialEq for Compatibility
impl StructuralPartialEq for Compatibility
Auto Trait Implementations§
impl Freeze for Compatibility
impl RefUnwindSafe for Compatibility
impl Send for Compatibility
impl Sync for Compatibility
impl Unpin for Compatibility
impl UnsafeUnpin for Compatibility
impl UnwindSafe for Compatibility
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