Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 66 variants TableNotFound(String), TableAlreadyExists(String), TableClosed, TableColumnsNotMatch { expected: usize, got: usize, }, TableHasActiveTransactions, ColumnNotFound(String), AmbiguousColumn(String), InvalidColumnType, VectorDimensionMismatch { expected: u16, got: u16, }, DuplicateColumn, InvalidValue, InvalidArgument(String), AuthorizationDenied(String), ValueTooLong { column: String, max: usize, got: usize, }, NotNullConstraint { column: String, }, PrimaryKeyConstraint { row_id: i64, }, UniqueConstraint { index: String, column: String, value: String, row_id: i64, }, CheckConstraintViolation { column: String, expression: String, }, ForeignKeyViolation { table: String, column: String, ref_table: String, ref_column: String, detail: String, }, TransactionNotStarted, TransactionAlreadyStarted, TransactionEnded, TransactionAborted, TransactionCommitted, TransactionClosed, InvalidTransactionTransition { txn_id: i64, expected: String, actual: String, }, TransactionSerializationConflict { row_id: i64, }, RowLockTimeout { row_id: i64, timeout_ms: u64, }, CompactionBackpressure { table: String, segments: u64, physical_bytes: u64, hard_segments: u64, hard_bytes: u64, }, IndexNotFound(String), IndexAlreadyExists(String), IndexColumnNotFound, IndexClosed, EngineNotOpen, EngineAlreadyOpen, ViewAlreadyExists(String), ViewNotFound(String), LockAcquisitionFailed(String), NoRowsReturned, NoStatementsToExecute, ColumnIndexOutOfBounds { index: usize, }, CursorNotPositioned, WalNotRunning, WalFileClosed, WalDurabilityUncertain { detail: String, }, PartialCommit { operation: String, committed_rows: i64, cause: String, }, CopyTransactionMemoryLimit { row: i64, limit_bytes: usize, attempted_bytes: usize, }, WalNotInitialized, DatabaseLocked, CannotDropPrimaryKey, NullComparison, IncomparableTypes, NotSupported(String), NativeFunction { function: String, status: u32, }, Navigation { code: NavigationErrorCode, detail: String, }, SegmentNotFound, ExpressionEvaluation, ExpressionEvaluationWithMessage { message: String, }, TypeConversion { from: String, to: String, }, Parse(String), Io { message: String, }, Internal { message: String, }, TableOrViewNotFound(String), Type(String), DivisionByZero, QueryCancelled,
}
Expand description

Main error type for RadixDB storage operations

This enum covers all error cases including both sentinel errors and structured errors with context.

Variants§

§

TableNotFound(String)

Table not found in the database

§

TableAlreadyExists(String)

Table already exists when trying to create

§

TableClosed

Table has been closed and cannot be used

§

TableColumnsNotMatch

Table column count mismatch

Fields

§expected: usize
§got: usize
§

TableHasActiveTransactions

Cannot truncate table because other transactions hold uncommitted writes

§

ColumnNotFound(String)

Column not found in table schema

§

AmbiguousColumn(String)

A result label resolves to more than one projected column.

§

InvalidColumnType

Invalid column type for operation

§

VectorDimensionMismatch

Vector dimension mismatch

Fields

§expected: u16
§got: u16
§

DuplicateColumn

Duplicate column name in schema

§

InvalidValue

Invalid value for operation

§

InvalidArgument(String)

Invalid argument for function

§

AuthorizationDenied(String)

Authenticated Principal lacks authority for the requested operation.

§

ValueTooLong

Value exceeds maximum length

Fields

§column: String
§max: usize
§got: usize
§

NotNullConstraint

NOT NULL constraint violation

Fields

§column: String
§

PrimaryKeyConstraint

Primary key constraint violation

Fields

§row_id: i64
§

UniqueConstraint

Unique constraint violation

Fields

§index: String
§column: String
§value: String
§row_id: i64

Row ID of the conflicting row (-1 if unknown)

§

CheckConstraintViolation

CHECK constraint violation

Fields

§column: String
§expression: String
§

ForeignKeyViolation

Foreign key constraint violation

Fields

§table: String
§column: String
§ref_table: String
§ref_column: String
§detail: String
§

TransactionNotStarted

Transaction has not been started

§

TransactionAlreadyStarted

Transaction has already been started

§

TransactionEnded

Transaction has already ended (committed or rolled back)

§

TransactionAborted

Transaction was aborted

§

TransactionCommitted

Transaction has already been committed

§

TransactionClosed

Transaction has been closed

§

InvalidTransactionTransition

A registry transition was requested for a missing transaction or from a state that cannot legally perform that transition.

Fields

§txn_id: i64
§expected: String
§actual: String
§

TransactionSerializationConflict

Adding a row wait would close a cycle in the transaction wait graph.

Fields

§row_id: i64
§

RowLockTimeout

A row writer exceeded the bounded claim wait.

Fields

§row_id: i64
§timeout_ms: u64
§

CompactionBackpressure

A table accumulated more uncompacted L0 work than the configured hard admission limit. The transaction has not published and may be retried.

Fields

§table: String
§segments: u64
§physical_bytes: u64
§hard_segments: u64
§hard_bytes: u64
§

IndexNotFound(String)

Index not found

§

IndexAlreadyExists(String)

Index already exists

§

IndexColumnNotFound

Column for index not found

§

IndexClosed

Index is closed

§

EngineNotOpen

Engine is not open

§

EngineAlreadyOpen

Engine is already open

§

ViewAlreadyExists(String)

View already exists

§

ViewNotFound(String)

View not found

§

LockAcquisitionFailed(String)

Failed to acquire lock

§

NoRowsReturned

Query returned no rows

§

NoStatementsToExecute

No statements to execute

§

ColumnIndexOutOfBounds

Column index out of bounds

Fields

§index: usize
§

CursorNotPositioned

A streaming cursor has no current row before its first successful advance or after end-of-stream.

§

WalNotRunning

WAL manager is not running

§

WalFileClosed

WAL file is closed

§

WalDurabilityUncertain

WAL bytes containing an outcome were written, but their durability could not be established. The transaction must be treated as terminal and callers must not assume rollback or safely retry the logical action.

Fields

§detail: String
§

PartialCommit

A bounded multi-transaction operation failed after publishing a durable prefix. Callers must not blindly retry the whole operation.

Fields

§operation: String
§committed_rows: i64
§cause: String
§

CopyTransactionMemoryLimit

One atomic COPY would exceed its configured resident-memory envelope.

Fields

§row: i64
§limit_bytes: usize
§attempted_bytes: usize
§

WalNotInitialized

WAL not initialized

§

DatabaseLocked

Database is locked by another process

§

CannotDropPrimaryKey

Cannot drop primary key column

§

NullComparison

Cannot compare NULL with non-NULL value

§

IncomparableTypes

Cannot compare incompatible types

§

NotSupported(String)

Operation not supported

§

NativeFunction

A native extension function failed. Arguments and plugin-provided detail are deliberately excluded from this public diagnostic.

Fields

§function: String
§status: u32
§

Navigation

Navigable-reference contract failure with a stable machine category.

Fields

§detail: String
§

SegmentNotFound

Segment not found (internal storage error)

§

ExpressionEvaluation

Expression evaluation failed

§

ExpressionEvaluationWithMessage

Expression evaluation failed with message

Fields

§message: String
§

TypeConversion

Type conversion error

Fields

§from: String
§

Parse(String)

Parse error

§

Io

IO error (wrapped)

Fields

§message: String
§

Internal

Internal error for unexpected conditions

Fields

§message: String
§

TableOrViewNotFound(String)

Table or view not found (with name)

§

Type(String)

Type error

§

DivisionByZero

Division by zero

§

QueryCancelled

Query cancelled

Implementations§

Source§

impl Error

Source

pub fn code(&self) -> ErrorCode

Return a stable machine-readable code without parsing presentation text.

Source

pub fn context(&self) -> ErrorContext

Return neutral classification for protocol, API, and diagnostic mapping.

Source

pub fn table_columns_not_match(expected: usize, got: usize) -> Self

Create a new TableColumnsNotMatch error

Source

pub fn value_too_long(column: impl Into<String>, max: usize, got: usize) -> Self

Create a new ValueTooLong error

Source

pub fn not_null_constraint(column: impl Into<String>) -> Self

Create a new NotNullConstraint error

Source

pub fn primary_key_constraint(row_id: i64) -> Self

Create a new PrimaryKeyConstraint error

Source

pub fn unique_constraint( index: impl Into<String>, column: impl Into<String>, value: impl Into<String>, ) -> Self

Create a new UniqueConstraint error

Source

pub fn foreign_key_violation( table: impl Into<String>, column: impl Into<String>, ref_table: impl Into<String>, ref_column: impl Into<String>, detail: impl Into<String>, ) -> Self

Create a new ForeignKeyViolation error

Source

pub fn type_conversion(from: impl Into<String>, to: impl Into<String>) -> Self

Create a new TypeConversion error

Source

pub fn parse(message: impl Into<String>) -> Self

Create a new Parse error

Source

pub fn io(message: impl Into<String>) -> Self

Create a new IO error

Source

pub fn internal(message: impl Into<String>) -> Self

Create a new Internal error

Source

pub fn expression_evaluation(message: impl Into<String>) -> Self

Create a new ExpressionEvaluationWithMessage error

Source

pub fn invalid_argument(message: impl Into<String>) -> Self

Create a new InvalidArgument error

Source

pub fn authorization_denied(message: impl Into<String>) -> Self

Create a stable authorization failure without exposing credentials or parameter values.

Source

pub fn navigation(code: NavigationErrorCode, detail: impl Into<String>) -> Self

Create a stable navigable-reference error.

Source

pub fn navigation_code(&self) -> Option<NavigationErrorCode>

Return the stable navigable-reference category, if this is one.

Source

pub fn is_not_found(&self) -> bool

Check if this is a “not found” type error

Source

pub fn is_constraint_violation(&self) -> bool

Check if this is a constraint violation error

Source

pub fn is_pk_or_unique_violation(&self) -> bool

PK or UNIQUE violation only (excludes NOT NULL / FK).

Source

pub fn is_transaction_error(&self) -> bool

Check if this is a transaction-related error

Source

pub fn is_retryable(&self) -> bool

The failed logical action did not publish and may be retried after the reported transient condition changes.

Trait Implementations§

Source§

impl Clone for Error

Source§

fn clone(&self) -> Error

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 Debug for Error

Source§

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

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

impl Display for Error

Source§

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

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

impl Eq for Error

Source§

impl Error for Error

1.30.0 · Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for Error

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Error

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

§

impl UnwindSafe for Error

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> CompactArcDrop for T

Source§

unsafe fn drop_and_dealloc(ptr: *mut u8)

Drop the contained data and deallocate the header+data allocation. 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> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V