#[non_exhaustive]pub enum EngineErrorKind {
Show 45 variants
Invalid,
OutOfRange,
Conversion,
UnknownType,
Decimal,
MismatchType,
DivideByZero,
ObjectSize,
InvalidType,
Serialization,
Transaction,
NotImplemented,
Expression,
Catalog,
Parser,
Planner,
Scheduler,
Executor,
Constraint,
Index,
Stat,
Connection,
Syntax,
Settings,
Binder,
Network,
Optimizer,
NullPointer,
Io,
Interrupt,
Fatal,
Internal,
InvalidInput,
OutOfMemory,
Permission,
ParameterNotResolved,
ParameterNotAllowed,
Dependency,
Http,
MissingExtension,
Autoload,
Sequence,
InvalidConfiguration,
Unknown(duckdb_error_type),
Unavailable,
}Expand description
How DuckDB itself classified an engine error.
Mirrors duckdb_error_type. Marked #[non_exhaustive] because DuckDB adds
error types across releases: a value this build does not recognise is kept
verbatim in EngineErrorKind::Unknown rather than being flattened into a
catch-all, so no information is lost and matching stays forward-compatible.
EngineErrorKind::Unavailable is distinct from Unknown: it means the
DuckDB API in question exposes only a status code and a message, with no
typed classification at all. This driver never invents a concrete kind by
parsing message text.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Invalid
DUCKDB_ERROR_INVALID
OutOfRange
DUCKDB_ERROR_OUT_OF_RANGE
Conversion
DUCKDB_ERROR_CONVERSION
UnknownType
DUCKDB_ERROR_UNKNOWN_TYPE
Decimal
DUCKDB_ERROR_DECIMAL
MismatchType
DUCKDB_ERROR_MISMATCH_TYPE
DivideByZero
DUCKDB_ERROR_DIVIDE_BY_ZERO
ObjectSize
DUCKDB_ERROR_OBJECT_SIZE
InvalidType
DUCKDB_ERROR_INVALID_TYPE
Serialization
DUCKDB_ERROR_SERIALIZATION
Transaction
DUCKDB_ERROR_TRANSACTION
NotImplemented
DUCKDB_ERROR_NOT_IMPLEMENTED
Expression
DUCKDB_ERROR_EXPRESSION
Catalog
DUCKDB_ERROR_CATALOG
Parser
DUCKDB_ERROR_PARSER
Planner
DUCKDB_ERROR_PLANNER
Scheduler
DUCKDB_ERROR_SCHEDULER
Executor
DUCKDB_ERROR_EXECUTOR
Constraint
DUCKDB_ERROR_CONSTRAINT — DuckDB does not say which constraint.
Index
DUCKDB_ERROR_INDEX
Stat
DUCKDB_ERROR_STAT
Connection
DUCKDB_ERROR_CONNECTION
Syntax
DUCKDB_ERROR_SYNTAX
Settings
DUCKDB_ERROR_SETTINGS
Binder
DUCKDB_ERROR_BINDER
Network
DUCKDB_ERROR_NETWORK
Optimizer
DUCKDB_ERROR_OPTIMIZER
NullPointer
DUCKDB_ERROR_NULL_POINTER
Io
DUCKDB_ERROR_IO
Interrupt
DUCKDB_ERROR_INTERRUPT
Fatal
DUCKDB_ERROR_FATAL
Internal
DUCKDB_ERROR_INTERNAL
InvalidInput
DUCKDB_ERROR_INVALID_INPUT
OutOfMemory
DUCKDB_ERROR_OUT_OF_MEMORY
Permission
DUCKDB_ERROR_PERMISSION
ParameterNotResolved
DUCKDB_ERROR_PARAMETER_NOT_RESOLVED
ParameterNotAllowed
DUCKDB_ERROR_PARAMETER_NOT_ALLOWED
Dependency
DUCKDB_ERROR_DEPENDENCY
Http
DUCKDB_ERROR_HTTP
MissingExtension
DUCKDB_ERROR_MISSING_EXTENSION
Autoload
DUCKDB_ERROR_AUTOLOAD
Sequence
DUCKDB_ERROR_SEQUENCE
InvalidConfiguration
DUCKDB_INVALID_CONFIGURATION
Unknown(duckdb_error_type)
DuckDB reported a classification this build does not know; the raw value is preserved so nothing is lost across DuckDB upgrades.
The originating DuckDB API offers no typed classification — only a status code and a message (prepare, extracted statements, pending, table description). Not a guess: an explicit absence.
Implementations§
Source§impl EngineErrorKind
impl EngineErrorKind
Sourcepub const KNOWN: &'static [EngineErrorKind]
pub const KNOWN: &'static [EngineErrorKind]
Every kind that maps 1:1 onto a duckdb_error_type this build knows.
Excludes Unknown and
Unavailable, which have no single raw value.
Sourcepub fn from_raw(raw: duckdb_error_type) -> EngineErrorKind
pub fn from_raw(raw: duckdb_error_type) -> EngineErrorKind
Classifies a raw duckdb_error_type, preserving unrecognised values.
Sourcepub fn to_raw(self) -> duckdb_error_type
pub fn to_raw(self) -> duckdb_error_type
Returns the raw duckdb_error_type for this kind.
Unavailable has no DuckDB counterpart and
maps to DUCKDB_ERROR_INVALID, which is what DuckDB itself uses for an
unclassified error.
Trait Implementations§
Source§impl Clone for EngineErrorKind
impl Clone for EngineErrorKind
Source§fn clone(&self) -> EngineErrorKind
fn clone(&self) -> EngineErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EngineErrorKind
Source§impl Debug for EngineErrorKind
impl Debug for EngineErrorKind
Source§impl Display for EngineErrorKind
impl Display for EngineErrorKind
impl Eq for EngineErrorKind
Source§impl Hash for EngineErrorKind
impl Hash for EngineErrorKind
Source§impl PartialEq for EngineErrorKind
impl PartialEq for EngineErrorKind
Source§fn eq(&self, other: &EngineErrorKind) -> bool
fn eq(&self, other: &EngineErrorKind) -> bool
self and other values to be equal, and is used by ==.