Skip to main content

EngineErrorKind

Enum EngineErrorKind 

Source
#[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
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.
§

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.

§

Unavailable

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

Source

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.

Source

pub fn from_raw(raw: duckdb_error_type) -> EngineErrorKind

Classifies a raw duckdb_error_type, preserving unrecognised values.

Source

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

Source§

fn clone(&self) -> EngineErrorKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for EngineErrorKind

Source§

impl Debug for EngineErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for EngineErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for EngineErrorKind

Source§

impl Hash for EngineErrorKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for EngineErrorKind

Source§

fn eq(&self, other: &EngineErrorKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for EngineErrorKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.