pub struct JobCancellationManager { /* private fields */ }Expand description
Job cancellation manager
Implementations§
Source§impl JobCancellationManager
 
impl JobCancellationManager
Sourcepub fn register_job(&self, job_id: JobId) -> CancellationToken
 
pub fn register_job(&self, job_id: JobId) -> CancellationToken
Register a new job with cancellation token
Sourcepub fn cancel_job(&self, job_id: JobId) -> bool
 
pub fn cancel_job(&self, job_id: JobId) -> bool
Cancel a specific job
Sourcepub fn cancel_all(&self)
 
pub fn cancel_all(&self)
Cancel all active jobs
Sourcepub fn unregister_job(&self, job_id: JobId)
 
pub fn unregister_job(&self, job_id: JobId)
Remove completed job from tracking
Sourcepub fn active_job_count(&self) -> usize
 
pub fn active_job_count(&self) -> usize
Get active job count
Sourcepub fn active_jobs(&self) -> Vec<JobId> ⓘ
 
pub fn active_jobs(&self) -> Vec<JobId> ⓘ
List all active job IDs
Trait Implementations§
Source§impl Debug for JobCancellationManager
 
impl Debug for JobCancellationManager
Auto Trait Implementations§
impl Freeze for JobCancellationManager
impl !RefUnwindSafe for JobCancellationManager
impl Send for JobCancellationManager
impl Sync for JobCancellationManager
impl Unpin for JobCancellationManager
impl !UnwindSafe for JobCancellationManager
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