pub enum DocOp {
Index {
id: Option<String>,
routing: Option<String>,
body: Bytes,
},
Create {
id: Option<String>,
routing: Option<String>,
body: Bytes,
},
Update {
id: String,
routing: Option<String>,
body: Bytes,
},
Delete {
id: String,
routing: Option<String>,
},
}Expand description
A document-level operation: the already-transformed body plus the
constructed id/routing (the tenancy rewrite has already run, docs/04).
Not #[non_exhaustive]: every sink must handle every op kind, so adding one
should force sinks to be updated.
Variants§
Index
Index (create-or-replace) a document.
Fields
Create
Create a document, failing with a conflict if the id already exists
(op_type=create). Distinct from DocOp::Index so the sink can target
the _create endpoint and surface the 409 (docs/04 §3).
Fields
Update
Partial-update a document by id (_update): the body carries the
already-transformed doc/upsert/script (docs/04 §3).
Fields
Delete
Delete a document by id.
Trait Implementations§
impl Eq for DocOp
impl StructuralPartialEq for DocOp
Auto Trait Implementations§
impl !Freeze for DocOp
impl RefUnwindSafe for DocOp
impl Send for DocOp
impl Sync for DocOp
impl Unpin for DocOp
impl UnsafeUnpin for DocOp
impl UnwindSafe for DocOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.