pub struct SchemaVersion(/* private fields */);Expand description
Version of the Document JSON layout, serialized as the integer schema_version.
Every document this crate writes carries SchemaVersion::CURRENT. JSON without the
field predates versioning and reads as version 1. crate::export::document_from_json
rejects other versions with crate::Error::SchemaVersion. The version increases only
when an existing field changes meaning or shape; new optional fields do not change it.
Implementations§
Trait Implementations§
Source§impl Clone for SchemaVersion
impl Clone for SchemaVersion
impl Copy for SchemaVersion
Source§impl Debug for SchemaVersion
impl Debug for SchemaVersion
Source§impl Default for SchemaVersion
impl Default for SchemaVersion
Source§impl<'de> Deserialize<'de> for SchemaVersion
impl<'de> Deserialize<'de> for SchemaVersion
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 SchemaVersion
Source§impl Hash for SchemaVersion
impl Hash for SchemaVersion
Source§impl PartialEq for SchemaVersion
impl PartialEq for SchemaVersion
Source§impl Serialize for SchemaVersion
impl Serialize for SchemaVersion
impl StructuralPartialEq for SchemaVersion
Auto Trait Implementations§
impl Forget for SchemaVersion
impl Freeze for SchemaVersion
impl Move for SchemaVersion
impl RefUnwindSafe for SchemaVersion
impl Send for SchemaVersion
impl Sync for SchemaVersion
impl Unpin for SchemaVersion
impl UnsafeUnpin 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