pub struct GraphHandle { /* private fields */ }Expand description
Handle for interacting with a running GraphActor from other tasks
Implementations§
Source§impl GraphHandle
impl GraphHandle
Sourcepub async fn mutate(&self, mutation: GraphMutation) -> Result<(), String>
pub async fn mutate(&self, mutation: GraphMutation) -> Result<(), String>
Apply a mutation to the graph. Returns Err if rejected or actor is gone.
Sourcepub async fn claim(&self, id: NodeId) -> bool
pub async fn claim(&self, id: NodeId) -> bool
Claim a node for execution (Pending/Ready → Running). Returns true if this caller won the claim race.
Sourcepub async fn complete(&self, id: NodeId, result: Value)
pub async fn complete(&self, id: NodeId, result: Value)
Mark a node as completed with its result value.
Sourcepub async fn fail(&self, id: NodeId, error: String)
pub async fn fail(&self, id: NodeId, error: String)
Mark a node as failed with an error message.
Sourcepub async fn snapshot(&self) -> Option<GraphSnapshot>
pub async fn snapshot(&self) -> Option<GraphSnapshot>
Get a point-in-time snapshot of the graph state.
Trait Implementations§
Source§impl Clone for GraphHandle
impl Clone for GraphHandle
Source§fn clone(&self) -> GraphHandle
fn clone(&self) -> GraphHandle
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 moreAuto Trait Implementations§
impl Freeze for GraphHandle
impl RefUnwindSafe for GraphHandle
impl Send for GraphHandle
impl Sync for GraphHandle
impl Unpin for GraphHandle
impl UnsafeUnpin for GraphHandle
impl UnwindSafe for GraphHandle
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