#[non_exhaustive]pub enum WriteOp {
KvPut {
key: Vec<u8>,
value: Vec<u8>,
},
KvDelete {
key: Vec<u8>,
},
VectorUpsert {
index: String,
id: Vec<u8>,
embedding: Vec<f32>,
metadata: Value,
},
GraphNode {
graph: String,
id: Vec<u8>,
label: String,
props: Value,
index_kind: String,
},
GraphEdge {
graph: String,
src: Vec<u8>,
dst: Vec<u8>,
rel: String,
props: Value,
},
}Expand description
One operation in an atomic_write batch.
All variants must commit together or all roll back. The backend translates each
variant to its native command (HSET, FT.SUGADD, GRAPH.QUERY MERGE on Moon).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
KvPut
KV put at this key/value pair.
KvDelete
KV tombstone (logical delete; physical removal at consolidation time).
VectorUpsert
Vector index upsert. index is the vector index name (e.g., “chunk_emb”).
GraphNode
Graph node upsert.
index_kind names the vector/keyword FT index this node’s content
lives in (e.g. "entities", "facts") — backends that register a
key_to_node mapping for graph-expanded search (Moon’s FT.NAVIGATE)
need it to build the node’s _key against the RIGHT index instead of
assuming every graph node is an entity. Defaults to "entities" on
deserialize (pre-index_kind callers / WAL replay) since entities were
the only graph-registered kind before this field existed.
GraphEdge
Graph edge upsert.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WriteOp
impl<'de> Deserialize<'de> for WriteOp
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WriteOp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WriteOp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for WriteOp
impl Serialize for WriteOp
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for WriteOp
impl RefUnwindSafe for WriteOp
impl Send for WriteOp
impl Sync for WriteOp
impl Unpin for WriteOp
impl UnsafeUnpin for WriteOp
impl UnwindSafe for WriteOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more