pub enum UpdateOperation {
UpsertNode {
id: NodeId,
label: String,
position: Position,
embedding: Option<Vec<f32>>,
},
UpsertEdge {
from: NodeId,
to: NodeId,
weight: f64,
},
DeleteNode {
id: NodeId,
},
DeleteEdge {
from: NodeId,
to: NodeId,
},
IncrementEdge {
from: NodeId,
to: NodeId,
delta: f64,
},
}Expand description
A single update operation.
Variants§
UpsertNode
Create or update a node.
UpsertEdge
Create or update an edge.
DeleteNode
Delete a node.
DeleteEdge
Delete an edge.
IncrementEdge
Increment edge weight (Hebbian learning).
Trait Implementations§
Source§impl Clone for UpdateOperation
impl Clone for UpdateOperation
Source§fn clone(&self) -> UpdateOperation
fn clone(&self) -> UpdateOperation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UpdateOperation
impl Debug for UpdateOperation
Source§impl<'de> Deserialize<'de> for UpdateOperation
impl<'de> Deserialize<'de> for UpdateOperation
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
Auto Trait Implementations§
impl Freeze for UpdateOperation
impl RefUnwindSafe for UpdateOperation
impl Send for UpdateOperation
impl Sync for UpdateOperation
impl Unpin for UpdateOperation
impl UnsafeUnpin for UpdateOperation
impl UnwindSafe for UpdateOperation
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