pub enum FormatVersion {
V1,
V2,
V3,
Unknown(u32),
}Expand description
File format version enum
Represents the different file format versions that SQLiteGraph has used. V1 is unsupported, V2 can be migrated to V3, V3 is current.
Variants§
V1
V1 format - unsupported, cannot be migrated
V2
V2 format - has 8-byte schema_version field at offset 32-39 Can be migrated to V3 (4-byte schema_version + 4-byte reserved)
V3
V3 format - current version with 4-byte schema_version + 4-byte reserved
Unknown(u32)
Unknown format version
Implementations§
Source§impl FormatVersion
impl FormatVersion
Sourcepub fn is_supported(&self) -> bool
pub fn is_supported(&self) -> bool
Check if this format version is supported
V2 and V3 are supported. V1 and unknown versions are not.
Sourcepub fn needs_migration_to_current(&self) -> bool
pub fn needs_migration_to_current(&self) -> bool
Check if this format needs migration to current version
V2 needs migration to V3. V3 is current.
Trait Implementations§
Source§impl Clone for FormatVersion
impl Clone for FormatVersion
Source§fn clone(&self) -> FormatVersion
fn clone(&self) -> FormatVersion
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 FormatVersion
impl Debug for FormatVersion
Source§impl PartialEq for FormatVersion
impl PartialEq for FormatVersion
impl Copy for FormatVersion
impl Eq for FormatVersion
impl StructuralPartialEq for FormatVersion
Auto Trait Implementations§
impl Freeze for FormatVersion
impl RefUnwindSafe for FormatVersion
impl Send for FormatVersion
impl Sync for FormatVersion
impl Unpin for FormatVersion
impl UnwindSafe for FormatVersion
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> 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§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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more