pub enum DbError {
Show 20 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 {
statement_id: Bytes,
},
ServerError,
ProtocolError,
RateLimitReached {
op_type: OperationType,
rejected_by_coordinator: bool,
},
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 syntactically correct but invalid
AlreadyExists
Fields
Attempted to create a keyspace or a table that was already existing
FunctionFailure
Fields
User defined function failed during execution
AuthenticationError
Authentication failed - bad credentials
The logged user doesn’t have the right to perform the query
ConfigError
The query is invalid because of some configuration issue
Not enough nodes are alive to satisfy required consistency level
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
Fields
consistency: Consistency
Consistency level of the query
Not enough nodes responded to the read request in time to satisfy required consistency level
WriteTimeout
Fields
consistency: Consistency
Consistency level of the query
Not enough nodes responded to the write request in time to satisfy required consistency level
ReadFailure
Fields
consistency: Consistency
Consistency level of the query
A non-timeout error during a read request
WriteFailure
Fields
consistency: Consistency
Consistency level of the query
A non-timeout error during a write request
Unprepared
Tried to execute a prepared statement that is not prepared. Driver should prepare it again
ServerError
Internal server error. This indicates a server-side bug
ProtocolError
Invalid protocol message received from the driver
RateLimitReached
Fields
op_type: OperationType
Type of the operation rejected by rate limiting.
Rate limit was exceeded for a partition affected by the request. (Scylla-specific) TODO: Should this have a “Scylla” prefix?
Other(i32)
Other error code not specified in the specification
Implementations§
Trait Implementations§
source§impl Error for DbError
impl Error for DbError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl PartialEq for DbError
impl PartialEq for DbError
impl Eq for DbError
impl StructuralPartialEq for DbError
Auto Trait Implementations§
impl RefUnwindSafe for DbError
impl Send for DbError
impl Sync for DbError
impl Unpin for DbError
impl UnwindSafe for DbError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.