pub struct Scheduler { /* private fields */ }Expand description
Wraps GraphHandle with a scheduler-oriented API. All state lives in the GraphActor; this is a coordination facade.
Implementations§
Source§impl Scheduler
impl Scheduler
pub fn new(handle: GraphHandle) -> Self
Sourcepub async fn claim(&self, id: NodeId) -> bool
pub async fn claim(&self, id: NodeId) -> bool
Claim a node for execution. Returns true if this caller won the race.
Sourcepub async fn snapshot(&self) -> Option<GraphSnapshot>
pub async fn snapshot(&self) -> Option<GraphSnapshot>
Get a snapshot of current graph state.
Sourcepub fn handle(&self) -> &GraphHandle
pub fn handle(&self) -> &GraphHandle
Access the underlying GraphHandle (for mutations).
Auto Trait Implementations§
impl Freeze for Scheduler
impl RefUnwindSafe for Scheduler
impl Send for Scheduler
impl Sync for Scheduler
impl Unpin for Scheduler
impl UnsafeUnpin for Scheduler
impl UnwindSafe for Scheduler
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