#[repr(C)]pub struct GraphMutation {
pub kind: GraphMutationKind,
pub node_a: u64,
pub node_b: u64,
pub weight_fp: i32,
pub partition_hint: u32,
}Expand description
A graph mutation request.
Graph mutations are passed to graph_apply_proved and require
a valid proof token to execute.
Fields§
§kind: GraphMutationKindThe kind of mutation.
node_a: u64Source node ID (for edge operations) or target node ID.
node_b: u64Destination node ID (for edge operations).
weight_fp: i32Edge weight (for AddEdge and UpdateEdgeWeight). Represented as fixed-point: weight * 10000.
partition_hint: u32Partition ID hint (for coherence routing).
Implementations§
Source§impl GraphMutation
impl GraphMutation
Sourcepub const fn remove_node(node_id: u64) -> Self
pub const fn remove_node(node_id: u64) -> Self
Creates a RemoveNode mutation.
Sourcepub const fn remove_edge(from: u64, to: u64) -> Self
pub const fn remove_edge(from: u64, to: u64) -> Self
Creates a RemoveEdge mutation.
Sourcepub const fn update_edge_weight(from: u64, to: u64, weight: f32) -> Self
pub const fn update_edge_weight(from: u64, to: u64, weight: f32) -> Self
Creates an UpdateEdgeWeight mutation.
Sourcepub const fn with_partition_hint(self, partition_id: u32) -> Self
pub const fn with_partition_hint(self, partition_id: u32) -> Self
Sets a partition hint for coherence-aware routing.
Trait Implementations§
Source§impl Clone for GraphMutation
impl Clone for GraphMutation
Source§fn clone(&self) -> GraphMutation
fn clone(&self) -> GraphMutation
Returns a duplicate of the value. Read more
1.0.0 · 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 GraphMutation
impl Debug for GraphMutation
Source§impl Default for GraphMutation
impl Default for GraphMutation
Source§impl PartialEq for GraphMutation
impl PartialEq for GraphMutation
impl Copy for GraphMutation
impl StructuralPartialEq for GraphMutation
Auto Trait Implementations§
impl Freeze for GraphMutation
impl RefUnwindSafe for GraphMutation
impl Send for GraphMutation
impl Sync for GraphMutation
impl Unpin for GraphMutation
impl UnsafeUnpin for GraphMutation
impl UnwindSafe for GraphMutation
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