#[non_exhaustive]pub enum RetentionError {
BatchBoundOutOfRange {
requested: u32,
},
AgeBoundTooSmall {
minimum: Duration,
},
NonTerminalStatus {
status: BatchStatus,
},
EmptyStatusSet,
RetentionPlanStale,
InstanceHeld {
job_instance_id: JobInstanceId,
},
OperationIdConflict {
action: RetentionAction,
operation_id: OperationId,
},
OperationOutcomeUnknown,
Repository(RepositoryError),
}Expand description
A typed retention failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BatchBoundOutOfRange
The requested batch bound is outside 1..=1000.
AgeBoundTooSmall
The requested minimum age is below MIN_PURGE_AGE.
NonTerminalStatus
A purge may target only finished statuses.
Fields
§
status: BatchStatusRejected status.
EmptyStatusSet
A purge must target at least one status.
RetentionPlanStale
A candidate changed after the plan was produced; nothing was deleted.
InstanceHeld
The instance is held, so it can be neither planned nor purged.
Fields
§
job_instance_id: JobInstanceIdHeld logical instance.
OperationIdConflict
The operation identifier was reused with a different request.
Fields
§
action: RetentionActionConflicting action.
§
operation_id: OperationIdConflicting idempotency key.
OperationOutcomeUnknown
The commit may or may not have become durable.
Repository(RepositoryError)
The repository failed.
Trait Implementations§
Source§impl Clone for RetentionError
impl Clone for RetentionError
Source§fn clone(&self) -> RetentionError
fn clone(&self) -> RetentionError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RetentionError
impl Debug for RetentionError
Source§impl Display for RetentionError
impl Display for RetentionError
impl Eq for RetentionError
Source§impl Error for RetentionError
impl Error for RetentionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<RepositoryError> for RetentionError
impl From<RepositoryError> for RetentionError
Source§fn from(value: RepositoryError) -> Self
fn from(value: RepositoryError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RetentionError
impl PartialEq for RetentionError
impl StructuralPartialEq for RetentionError
Auto Trait Implementations§
impl Freeze for RetentionError
impl RefUnwindSafe for RetentionError
impl Send for RetentionError
impl Sync for RetentionError
impl Unpin for RetentionError
impl UnsafeUnpin for RetentionError
impl UnwindSafe for RetentionError
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