#[non_exhaustive]pub enum MongrelError {
Show 37 variants
Io(Error),
DatabaseLocked {
path: PathBuf,
message: String,
},
DatabaseBusy {
strong_handles: usize,
},
ForkedProcess {
owner_pid: u32,
current_pid: u32,
},
Serialization(Error),
CorruptWal {
offset: u64,
reason: String,
},
TornWrite {
offset: u64,
},
ChecksumMismatch {
expected: u64,
actual: u64,
context: String,
},
MagicMismatch {
what: &'static str,
expected: [u8; 8],
got: [u8; 8],
},
UnsupportedStorageVersion {
component: &'static str,
found: u16,
supported: u16,
},
Schema(String),
ColumnNotFound(String),
EncryptionDisabled,
Encryption(String),
Decryption(String),
EntropyUnavailable(String),
NotFound(String),
InvalidArgument(String),
Full(String),
Conflict(String),
Deadlock {
victim: u64,
cycle: String,
},
SerializationFailure {
message: String,
},
TriggerValidation(String),
ReadOnlyReplica,
AuthRequired,
AuthNotRequired,
InvalidCredentials {
username: String,
},
PermissionDenied {
required: Permission,
principal: String,
},
DeadlineExceeded,
WorkBudgetExceeded,
ResourceLimitExceeded {
resource: &'static str,
requested: usize,
limit: usize,
},
Cancelled,
DurableCommit {
epoch: u64,
message: String,
},
CommitOutcomeUnknown {
epoch: u64,
message: String,
},
CursorStale(String),
CursorExpired,
Other(String),
}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.
Io(Error)
DatabaseLocked
DatabaseBusy
ForkedProcess
Serialization(Error)
CorruptWal
TornWrite
ChecksumMismatch
MagicMismatch
UnsupportedStorageVersion
Schema(String)
ColumnNotFound(String)
EncryptionDisabled
Encryption(String)
Decryption(String)
NotFound(String)
InvalidArgument(String)
Full(String)
Conflict(String)
Deadlock
SerializationFailure
TriggerValidation(String)
ReadOnlyReplica
AuthRequired
AuthNotRequired
InvalidCredentials
PermissionDenied
DeadlineExceeded
WorkBudgetExceeded
ResourceLimitExceeded
Cancelled
DurableCommit
CommitOutcomeUnknown
CursorStale(String)
CursorExpired
Other(String)
Implementations§
Source§impl MongrelError
impl MongrelError
Sourcepub fn category(&self) -> ErrorCategory
pub fn category(&self) -> ErrorCategory
Maps this error onto the stable cross-language error taxonomy (spec section 9.7, FND-007).
The taxonomy is deliberately coarser than MongrelError: bindings
and gateways only see the [ErrorCategory], while the full variant
and message remain available in-process. The mapping is total; several
single-node variants have no exact cluster counterpart, so non-obvious
choices are documented at the arm.
Trait Implementations§
Source§impl Debug for MongrelError
impl Debug for MongrelError
Source§impl Display for MongrelError
impl Display for MongrelError
Source§impl Error for MongrelError
impl Error for MongrelError
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<Error> for MongrelError
impl From<Error> for MongrelError
Source§impl From<JobError> for MongrelError
impl From<JobError> for MongrelError
Source§impl From<LockError> for MongrelError
impl From<LockError> for MongrelError
Source§fn from(error: LockError) -> Self
fn from(error: LockError) -> Self
Maps onto the matching MongrelError variant. A deadlock becomes
MongrelError::Deadlock — victim and cycle preserved — so callers see
the precise ErrorCategory::Deadlock with the same
retry-the-whole-transaction discipline as Conflict.
Source§impl From<SpillError> for MongrelError
impl From<SpillError> for MongrelError
Source§fn from(error: SpillError) -> Self
fn from(error: SpillError) -> Self
Converts to this type from the input type.
Source§impl From<StorageModeError> for MongrelError
impl From<StorageModeError> for MongrelError
Source§fn from(error: StorageModeError) -> Self
fn from(error: StorageModeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for MongrelError
impl !UnwindSafe for MongrelError
impl Freeze for MongrelError
impl Send for MongrelError
impl Sync for MongrelError
impl Unpin for MongrelError
impl UnsafeUnpin for MongrelError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more