pub struct RevocationManager { /* private fields */ }Expand description
Revocation manager for tracking revoked tasks
Implementations§
Source§impl RevocationManager
impl RevocationManager
Sourcepub fn revoke(&mut self, task_id: Uuid, mode: RevocationMode)
pub fn revoke(&mut self, task_id: Uuid, mode: RevocationMode)
Revoke a task by ID
Sourcepub fn revoke_with_request(&mut self, request: RevocationRequest)
pub fn revoke_with_request(&mut self, request: RevocationRequest)
Revoke a task with a full request
Sourcepub fn revoke_by_pattern(&mut self, pattern: &str, mode: RevocationMode)
pub fn revoke_by_pattern(&mut self, pattern: &str, mode: RevocationMode)
Revoke all tasks matching a pattern
Sourcepub fn revoke_with_pattern(&mut self, revocation: PatternRevocation)
pub fn revoke_with_pattern(&mut self, revocation: PatternRevocation)
Revoke by pattern with full configuration
Sourcepub fn bulk_revoke(&mut self, task_ids: &[Uuid], mode: RevocationMode)
pub fn bulk_revoke(&mut self, task_ids: &[Uuid], mode: RevocationMode)
Bulk revoke multiple tasks
Sourcepub fn is_revoked(&self, task_id: Uuid) -> bool
pub fn is_revoked(&self, task_id: Uuid) -> bool
Check if a task is revoked (by ID)
Sourcepub fn check_revocation(
&self,
task_id: Uuid,
task_name: &str,
) -> RevocationResult
pub fn check_revocation( &self, task_id: Uuid, task_name: &str, ) -> RevocationResult
Check if a task should be revoked (by ID or pattern)
Sourcepub fn mark_terminated(&mut self, task_id: Uuid)
pub fn mark_terminated(&mut self, task_id: Uuid)
Mark a task as terminated
Sourcepub fn is_terminated(&self, task_id: Uuid) -> bool
pub fn is_terminated(&self, task_id: Uuid) -> bool
Check if a task has been terminated
Sourcepub fn remove_pattern(&mut self, pattern: &str)
pub fn remove_pattern(&mut self, pattern: &str)
Remove pattern-based revocations matching a pattern string
Sourcepub fn cleanup_expired(&mut self)
pub fn cleanup_expired(&mut self)
Clean up expired revocations
Sourcepub fn revoked_ids(&self) -> Vec<Uuid>
pub fn revoked_ids(&self) -> Vec<Uuid>
Get all revoked task IDs
Sourcepub fn revoked_count(&self) -> usize
pub fn revoked_count(&self) -> usize
Get count of revoked tasks
Sourcepub fn export_state(&self) -> RevocationState
pub fn export_state(&self) -> RevocationState
Export state for persistence
Sourcepub fn import_state(&mut self, state: RevocationState)
pub fn import_state(&mut self, state: RevocationState)
Import state from persistence
Trait Implementations§
Source§impl Debug for RevocationManager
impl Debug for RevocationManager
Source§impl Default for RevocationManager
impl Default for RevocationManager
Source§fn default() -> RevocationManager
fn default() -> RevocationManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RevocationManager
impl RefUnwindSafe for RevocationManager
impl Send for RevocationManager
impl Sync for RevocationManager
impl Unpin for RevocationManager
impl UnwindSafe for RevocationManager
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