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
Attempted to create a keyspace or a table that was already existing
Fields
FunctionFailure
User defined function failed during execution
Fields
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
Not enough nodes responded to the read request in time to satisfy required consistency level
Fields
consistency: Consistency
Consistency level of the query
WriteTimeout
Not enough nodes responded to the write request in time to satisfy required consistency level
Fields
consistency: Consistency
Consistency level of the query
ReadFailure
A non-timeout error during a read request
Fields
consistency: Consistency
Consistency level of the query
WriteFailure
A non-timeout error during a write request
Fields
consistency: Consistency
Consistency level of the query
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
Rate limit was exceeded for a partition affected by the request. (Scylla-specific) TODO: Should this have a “Scylla” prefix?
Fields
op_type: OperationType
Type of the operation rejected by rate limiting.
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 !Freeze for DbError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more