pub enum StorageModeError {
ClusterReplicaRequiresClusterRuntime {
cluster_id: ClusterId,
node_id: NodeId,
database_id: DatabaseId,
},
IdentityMismatch(String),
Corrupt {
reason: String,
},
UnsupportedVersion {
found: u16,
supported: u16,
},
Conflict(String),
Io(Error),
}Expand description
Typed errors of the storage-mode marker (spec section 5.3). Mirrors the
subsystem-error idiom of crate::locks::LockError;
[From<StorageModeError> for MongrelError] maps onto the closest existing
engine variants.
Variants§
ClusterReplicaRequiresClusterRuntime
A normal open path touched a cluster-replica database.
Fields
§
database_id: DatabaseIdReplicated database.
IdentityMismatch(String)
The cluster runtime offered an identity that disagrees with the marker (fail closed: opening the wrong replica would corrupt two clusters).
Corrupt
The marker failed validation (fails closed).
UnsupportedVersion
The marker was written by a newer format than this build supports.
Conflict(String)
A mode change was requested (spec section 5.2 forbids in-place conversion).
Io(Error)
Underlying I/O failure.
Trait Implementations§
Source§impl Debug for StorageModeError
impl Debug for StorageModeError
Source§impl Display for StorageModeError
impl Display for StorageModeError
Source§impl Error for StorageModeError
impl Error for StorageModeError
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 StorageModeError
impl From<Error> for StorageModeError
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 StorageModeError
impl !UnwindSafe for StorageModeError
impl Freeze for StorageModeError
impl Send for StorageModeError
impl Sync for StorageModeError
impl Unpin for StorageModeError
impl UnsafeUnpin for StorageModeError
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