pub struct Schema {
pub kind: &'static str,
pub current: u32,
/* private fields */
}Expand description
A kind of document and its versions.
Fields§
§kind: &'static str§current: u32Implementations§
Source§impl Schema
impl Schema
pub fn new(kind: &'static str, current: u32) -> Self
Sourcepub fn upgrade(&self, json: Json) -> Result<Loaded<Json>, DocError>
pub fn upgrade(&self, json: Json) -> Result<Loaded<Json>, DocError>
Brings a document’s JSON to the current version.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin for Schema
impl UnwindSafe for Schema
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