pub struct Versioned {
pub version: u16,
}Expand description
A minimal mixin for peeking a sidecar’s schema version.
Deserializing a sidecar file into Versioned extracts only the version
field (serde ignores every other field) and defaults it to 0 when absent,
so a reader can learn a file’s schema version without deserializing the whole
snapshot and without failing on an older, version-less file.
Fields§
§version: u16The sidecar schema version. Defaults to 0 for a file written before the
field existed.
Trait Implementations§
impl Copy for Versioned
Source§impl<'de> Deserialize<'de> for Versioned
impl<'de> Deserialize<'de> for Versioned
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
impl Eq for Versioned
impl StructuralPartialEq for Versioned
Auto Trait Implementations§
impl Freeze for Versioned
impl RefUnwindSafe for Versioned
impl Send for Versioned
impl Sync for Versioned
impl Unpin for Versioned
impl UnsafeUnpin for Versioned
impl UnwindSafe for Versioned
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.