#[non_exhaustive]pub enum StoreError {
NotFound(EffectId),
InvalidTransition(InvalidTransition),
VersionConflict {
expected: u64,
actual: u64,
},
LeaseHeld {
owner: WorkerId,
expires_at: SystemTime,
},
LeaseLost,
Backend(Box<dyn Error + Sync + Send>),
}Expand description
Why a store operation failed.
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.
NotFound(EffectId)
No record has this id.
InvalidTransition(InvalidTransition)
The transition is not legal from the record’s status.
VersionConflict
The record changed since the caller read it.
LeaseHeld
Another worker, or another task of this one, holds a live lease.
Fields
§
expires_at: SystemTimeWhen its lease lapses unless renewed.
LeaseLost
The caller’s lease expired or was taken over. The caller must stop acting on the effect.
Backend(Box<dyn Error + Sync + Send>)
The storage backend failed.
Implementations§
Trait Implementations§
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
Source§impl Error for StoreError
impl Error for StoreError
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<InvalidTransition> for StoreError
impl From<InvalidTransition> for StoreError
Source§fn from(source: InvalidTransition) -> StoreError
fn from(source: InvalidTransition) -> StoreError
Converts to this type from the input type.
Source§impl From<StoreError> for RuntimeError
impl From<StoreError> for RuntimeError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for StoreError
impl !UnwindSafe for StoreError
impl Freeze for StoreError
impl Send for StoreError
impl Sync for StoreError
impl Unpin for StoreError
impl UnsafeUnpin for StoreError
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