pub struct QuarantineStore { /* private fields */ }Expand description
Bounded, restart-persistent quarantine store.
Implementations§
Source§impl QuarantineStore
impl QuarantineStore
Sourcepub fn open(root: impl Into<PathBuf>, max_entries: usize) -> UpdateResult<Self>
pub fn open(root: impl Into<PathBuf>, max_entries: usize) -> UpdateResult<Self>
Opens or creates a quarantine store with a bounded entry count.
Sourcepub fn quarantine(
&self,
descriptor: &ArtifactDescriptor,
reason: QuarantineReason,
at_ms: u64,
) -> UpdateResult<QuarantineRecord>
pub fn quarantine( &self, descriptor: &ArtifactDescriptor, reason: QuarantineReason, at_ms: u64, ) -> UpdateResult<QuarantineRecord>
Records or reactivates a release quarantine entry.
Sourcepub fn quarantine_until(
&self,
descriptor: &ArtifactDescriptor,
reason: QuarantineReason,
at_ms: u64,
expires_at_ms: Option<u64>,
) -> UpdateResult<QuarantineRecord>
pub fn quarantine_until( &self, descriptor: &ArtifactDescriptor, reason: QuarantineReason, at_ms: u64, expires_at_ms: Option<u64>, ) -> UpdateResult<QuarantineRecord>
Records or reactivates a quarantine entry with an optional expiry.
Sourcepub fn is_quarantined(&self, key: &QuarantineKey) -> UpdateResult<bool>
pub fn is_quarantined(&self, key: &QuarantineKey) -> UpdateResult<bool>
Returns whether automatic selection must skip a release key.
Sourcepub fn is_quarantined_at(
&self,
key: &QuarantineKey,
at_ms: u64,
) -> UpdateResult<bool>
pub fn is_quarantined_at( &self, key: &QuarantineKey, at_ms: u64, ) -> UpdateResult<bool>
Returns whether a release is active at a specific Unix timestamp.
Sourcepub fn list(&self) -> UpdateResult<Vec<QuarantineRecord>>
pub fn list(&self) -> UpdateResult<Vec<QuarantineRecord>>
Returns all entries in stable key order without changing state.
Sourcepub fn release(&self, key: &QuarantineKey, at_ms: u64) -> UpdateResult<bool>
pub fn release(&self, key: &QuarantineKey, at_ms: u64) -> UpdateResult<bool>
Explicitly releases a key while retaining its history across restarts.
Trait Implementations§
Source§impl Clone for QuarantineStore
impl Clone for QuarantineStore
Auto Trait Implementations§
impl Freeze for QuarantineStore
impl RefUnwindSafe for QuarantineStore
impl Send for QuarantineStore
impl Sync for QuarantineStore
impl Unpin for QuarantineStore
impl UnsafeUnpin for QuarantineStore
impl UnwindSafe for QuarantineStore
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