pub enum Op {
Increment(f64),
Add(Vec<ParseValue>),
AddUnique(Vec<ParseValue>),
Remove(Vec<ParseValue>),
Delete,
AddRelation(Vec<ParseValue>),
RemoveRelation(Vec<ParseValue>),
Batch(Vec<Op>),
}Expand description
A field operation.
Not #[non_exhaustive], for the reason given on ParseValue: a new operation must break
every write path that applies one, rather than falling into a wildcard arm that silently
ignores it.
Variants§
Increment(f64)
{"__op":"Increment","amount":n}. Negative amounts decrement; there is no separate op.
Add(Vec<ParseValue>)
{"__op":"Add","objects":[...]}. Appends, duplicates allowed.
AddUnique(Vec<ParseValue>)
{"__op":"AddUnique","objects":[...]}. Appends only values not already present.
Remove(Vec<ParseValue>)
{"__op":"Remove","objects":[...]}. Removes every occurrence.
Delete
{"__op":"Delete"}. Unsets the field.
AddRelation(Vec<ParseValue>)
{"__op":"AddRelation","objects":[pointers]}
RemoveRelation(Vec<ParseValue>)
{"__op":"RemoveRelation","objects":[pointers]}
Batch(Vec<Op>)
{"__op":"Batch","ops":[...]}. Upstream only ever produces a batch of relation ops, but
the decoder does not enforce that, so neither does this.