pub struct VersionCompatibility;Expand description
Version compatibility rules.
These rules ensure the 20-year compatibility promise.
Implementations§
Source§impl VersionCompatibility
impl VersionCompatibility
Sourcepub fn can_read(reader_version: &Version, file_version: &Version) -> bool
pub fn can_read(reader_version: &Version, file_version: &Version) -> bool
Check if reader version can read file version.
Rule: Newer readers can always read older files
Sourcepub fn needs_migration(
current_version: &Version,
file_version: &Version,
) -> bool
pub fn needs_migration( current_version: &Version, file_version: &Version, ) -> bool
Check if file needs migration
Sourcepub fn is_compatible(v1: &Version, v2: &Version) -> bool
pub fn is_compatible(v1: &Version, v2: &Version) -> bool
Check if versions are fully compatible (same major)
Trait Implementations§
Source§impl Clone for VersionCompatibility
impl Clone for VersionCompatibility
Source§fn clone(&self) -> VersionCompatibility
fn clone(&self) -> VersionCompatibility
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 moreAuto Trait Implementations§
impl Freeze for VersionCompatibility
impl RefUnwindSafe for VersionCompatibility
impl Send for VersionCompatibility
impl Sync for VersionCompatibility
impl Unpin for VersionCompatibility
impl UnsafeUnpin for VersionCompatibility
impl UnwindSafe for VersionCompatibility
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