pub struct CancelManager { /* private fields */ }Expand description
Manages remote cancellation requests.
Tracks active cancellation tokens and delivers cancel signals to local actors when requested by remote nodes.
Implementations§
Source§impl CancelManager
impl CancelManager
Sourcepub fn register(&mut self, request_id: String, token: CancellationToken)
pub fn register(&mut self, request_id: String, token: CancellationToken)
Register a cancellation token for a request.
Sourcepub fn cancel(&mut self, request_id: &str) -> CancelResponse
pub fn cancel(&mut self, request_id: &str) -> CancelResponse
Process a cancel request. Cancels the token if found.
Sourcepub fn remove(&mut self, request_id: &str)
pub fn remove(&mut self, request_id: &str)
Remove a token after the operation completes (cleanup).
Sourcepub fn active_count(&self) -> usize
pub fn active_count(&self) -> usize
Number of active cancellable operations.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CancelManager
impl RefUnwindSafe for CancelManager
impl Send for CancelManager
impl Sync for CancelManager
impl Unpin for CancelManager
impl UnsafeUnpin for CancelManager
impl UnwindSafe for CancelManager
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