pub enum Change {
Upsert {
table: String,
id: String,
fields: JsonMap,
deleted: bool,
},
Delete {
table: String,
id: String,
},
Restore {
table: String,
id: String,
},
Purge {
table: String,
id: String,
},
File {
file: FileState,
},
Schema {
table: String,
schema: Option<TableSchema>,
},
}Expand description
One change for the app’s store. Every change is already merged: apply it as given.
Variants§
Upsert
Write these fields. fields is a patch: absent columns stay as they
are, and null empties a field. A row seen for the first time arrives
with every field the server has. deleted is the row’s trash state.
Delete
Move the row to the app’s trash; keep its values.
Restore
Take the row out of the trash.
Purge
The row no longer exists for this client: drop it.
File
File metadata only; the bytes are fetched on demand.
Schema
A table’s schema changed; None when the table was dropped.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Change
impl<'de> Deserialize<'de> for Change
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 StructuralPartialEq for Change
Auto Trait Implementations§
impl Forget for Change
impl Freeze for Changewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
*const LeafNode<String, ColumnDef> is !null: Freeze,
PhantomData<Box<(String, ColumnDef)>>: Freeze,
PhantomData<String>: Freeze,
impl Move for Change
impl RefUnwindSafe for Change
impl Send for Change
impl Sync for Change
impl Unpin for Change
impl UnsafeUnpin for Changewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
*const LeafNode<String, ColumnDef> is !null: UnsafeUnpin,
PhantomData<Box<(String, ColumnDef)>>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for Changewhere
RawVecInner: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
BTreeMap<String, ColumnDef>: UnwindSafe,
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