pub enum StorageErrorKind {
Show 14 variants
Io,
CorruptData,
CorruptCrc,
WalReplay,
CatalogCorrupt,
PageCorrupt,
InvalidIdentifier,
RowTooLarge,
ValueTooLarge,
OverflowCorrupt,
DdlInTransaction,
TransactionTooLarge,
UniqueConstraintViolation,
UniqueExpressionIndexViolation,
}Expand description
The kind of a StorageError, stripped of its payload.
StorageError can be neither Clone nor PartialEq because
StorageError::Io wraps std::io::Error, which is neither. Callers
that must keep a refusal around and branch on it later carry this instead
of the error itself: the query layer stores it in QueryError::Storage
beside the rendered message, and the server maps it to a wire error class.
StorageError::kind matches exhaustively, so a new StorageError
variant does not compile until it has been given a kind here, and the
server’s mapping from kind to wire class is exhaustive for the same
reason. That is the whole point of the type: the class of an error a
client acts on is decided by the compiler, not by a substring search over
a message that anyone may reword.
Variants§
Io
CorruptData
CorruptCrc
WalReplay
CatalogCorrupt
PageCorrupt
InvalidIdentifier
RowTooLarge
ValueTooLarge
OverflowCorrupt
DdlInTransaction
TransactionTooLarge
UniqueConstraintViolation
UniqueExpressionIndexViolation
Trait Implementations§
Source§impl Clone for StorageErrorKind
impl Clone for StorageErrorKind
Source§fn clone(&self) -> StorageErrorKind
fn clone(&self) -> StorageErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more