pub enum StorageOp {
PutGroup(ClientGroupRecord),
DeleteGroup(String),
PutClient(ClientRecord),
DeleteClients(Vec<String>),
SetDeletedClients(Vec<ClientIdPair>),
UpdateSnapshot {
group: String,
changes: Vec<(String, Option<Value>)>,
cleared: bool,
cookie: Value,
last_mutation_ids: BTreeMap<String, f64>,
},
AddMutation {
group: String,
mutation: StoredMutation,
},
SetAggregateWrites {
group: String,
client_id: String,
id: f64,
writes: AggregateWrites,
},
DeleteConfirmedMutations {
group: String,
last_mutation_ids: BTreeMap<String, f64>,
},
}Expand description
A change to the database, applied in order.
Variants§
PutGroup(ClientGroupRecord)
Adds the group, or updates whether it is disabled.
DeleteGroup(String)
Deletes the group with its snapshot and mutations.
PutClient(ClientRecord)
Adds the client, or updates its heartbeat.
DeleteClients(Vec<String>)
Deletes the clients.
SetDeletedClients(Vec<ClientIdPair>)
Replaces the deleted clients.
UpdateSnapshot
The snapshot after a poke: the keys it changed (None for deleted),
whether it cleared every key first, and its cookie and last mutation
IDs. Drops the mutations the IDs confirm.
Fields
§
changes: Vec<(String, Option<Value>)>The keys the poke changed, with their values (None for deleted).
The snapshot’s cookie.
AddMutation
Adds a mutation that is pending.
SetAggregateWrites
What a rebase of a pending mutation wrote to synced aggregate rows.
Fields
§
writes: AggregateWritesThe aggregate rows it wrote.
DeleteConfirmedMutations
Drops the mutations the IDs confirm, keeping the snapshot.
Trait Implementations§
impl StructuralPartialEq for StorageOp
Auto Trait Implementations§
impl Forget for StorageOp
impl Freeze for StorageOp
impl Move for StorageOp
impl RefUnwindSafe for StorageOp
impl Send for StorageOp
impl Sync for StorageOp
impl Unpin for StorageOp
impl UnsafeUnpin for StorageOp
impl UnwindSafe for StorageOp
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