pub enum RetryClass {
Retryable,
Permanent,
}Expand description
Whether a failure is worth retrying as-is.
This mirrors the transport layer’s
TransportErrorKind: a Retryable failure
is transient (a later attempt may succeed), a Permanent failure is
deterministic (re-running the identical operation cannot change the outcome).
It lives in the lock module — the lowest layer that needs it — so both
LockError and RepositoryError can
share one vocabulary without the repository layer depending on the bus.
Variants§
Retryable
A transient failure. Retrying the same operation may succeed.
Permanent
A deterministic failure. Retrying the identical operation will not help.
Implementations§
Source§impl RetryClass
impl RetryClass
Sourcepub fn is_retryable(self) -> bool
pub fn is_retryable(self) -> bool
Whether this class is retryable.
Sourcepub fn is_permanent(self) -> bool
pub fn is_permanent(self) -> bool
Whether this class is permanent.
Trait Implementations§
Source§impl Clone for RetryClass
impl Clone for RetryClass
Source§fn clone(&self) -> RetryClass
fn clone(&self) -> RetryClass
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 moreimpl Copy for RetryClass
Source§impl Debug for RetryClass
impl Debug for RetryClass
impl Eq for RetryClass
Source§impl Hash for RetryClass
impl Hash for RetryClass
Source§impl PartialEq for RetryClass
impl PartialEq for RetryClass
impl StructuralPartialEq for RetryClass
Auto Trait Implementations§
impl Freeze for RetryClass
impl RefUnwindSafe for RetryClass
impl Send for RetryClass
impl Sync for RetryClass
impl Unpin for RetryClass
impl UnsafeUnpin for RetryClass
impl UnwindSafe for RetryClass
Blanket Implementations§
Source§impl<T> AggregateBuilder for T
impl<T> AggregateBuilder for T
fn aggregate<A: Aggregate>(self) -> AggregateRepository<Self, A>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Queueable for T
impl<T> Queueable for T
Source§fn queued(self) -> QueuedRepository<Self, InMemoryLockManager>
fn queued(self) -> QueuedRepository<Self, InMemoryLockManager>
Wrap with the default async lock manager. Pair with
.aggregate::<T>() for per-aggregate serialization over the async
repository surface.Source§fn queued_with<L: LockManager>(
self,
lock_manager: L,
) -> QueuedRepository<Self, L>
fn queued_with<L: LockManager>( self, lock_manager: L, ) -> QueuedRepository<Self, L>
Wrap with a custom async lock manager.