Enum scylla::transport::errors::DbError[][src]

pub enum DbError {
Show 19 variants SyntaxError, Invalid, AlreadyExists { keyspace: String, table: String, }, FunctionFailure { keyspace: String, function: String, arg_types: Vec<String>, }, AuthenticationError, Unauthorized, ConfigError, Unavailable { consistency: Consistency, required: i32, alive: i32, }, Overloaded, IsBootstrapping, TruncateError, ReadTimeout { consistency: Consistency, received: i32, required: i32, data_present: bool, }, WriteTimeout { consistency: Consistency, received: i32, required: i32, write_type: WriteType, }, ReadFailure { consistency: Consistency, received: i32, required: i32, numfailures: i32, data_present: bool, }, WriteFailure { consistency: Consistency, received: i32, required: i32, numfailures: i32, write_type: WriteType, }, Unprepared, ServerError, ProtocolError, Other(i32),
}
Expand description

An error sent from the database in response to a query as described in the specification

Variants

SyntaxError

The submitted query has a syntax error

Invalid

The query is syntatically correct but invalid

AlreadyExists

Attempted to create a keyspace or a table that was already existing

Fields of AlreadyExists

keyspace: String

Created keyspace name or name of the keyspace in which table was created

table: String

Name of the table created, in case of keyspace creation it’s an empty string

FunctionFailure

User defined function failed during execution

Fields of FunctionFailure

keyspace: String

Keyspace of the failed function

function: String

Name of the failed function

arg_types: Vec<String>

Types of arguments passed to the function

AuthenticationError

Authentication failed - bad credentials

Unauthorized

The logged user doesn’t have the right to perform the query

ConfigError

The query is invalid because of some configuration issue

Unavailable

Not enough nodes are alive to satisfy required consistency level

Fields of Unavailable

consistency: Consistency

Consistency level of the query

required: i32

Number of nodes required to be alive to satisfy required consistency level

alive: i32

Found number of active nodes

Overloaded

The request cannot be processed because the coordinator node is overloaded

IsBootstrapping

The coordinator node is still bootstrapping

TruncateError

Error during truncate operation

ReadTimeout

Not enough nodes responded to the read request in time to satisfy required consistency level

Fields of ReadTimeout

consistency: Consistency

Consistency level of the query

received: i32

Number of nodes that responded to the read request

required: i32

Number of nodes required to respond to satisfy required consistency level

data_present: bool

Replica that was asked for data has responded

WriteTimeout

Not enough nodes responded to the write request in time to satisfy required consistency level

Fields of WriteTimeout

consistency: Consistency

Consistency level of the query

received: i32

Number of nodes that responded to the write request

required: i32

Number of nodes required to respond to satisfy required consistency level

write_type: WriteType

Type of write operation requested

ReadFailure

A non-timeout error during a read request

Fields of ReadFailure

consistency: Consistency

Consistency level of the query

received: i32

Number of nodes that responded to the read request

required: i32

Number of nodes required to respond to satisfy required consistency level

numfailures: i32

Number of nodes that experience a failure while executing the request

data_present: bool

Replica that was asked for data has responded

WriteFailure

A non-timeout error during a write request

Fields of WriteFailure

consistency: Consistency

Consistency level of the query

received: i32

Number of ndoes that responded to the read request

required: i32

Number of nodes required to respond to satisfy required consistency level

numfailures: i32

Number of nodes that experience a failure while executing the request

write_type: WriteType

Type of write operation requested

Unprepared

Tried to execute a prepared statement that is not prepared. Driver shoud prepare it again

ServerError

Internal server error. This indicates a server-side bug

ProtocolError

Invalid protocol message received from the driver

Other(i32)

Other error code not specified in the specification

Tuple Fields of Other

0: i32

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more