Enum cdrs_tokio::error::Error
source · #[non_exhaustive]pub enum Error {
Show 24 variants
Io(Error),
UuidParse(Error),
General(String),
FromUtf8(FromUtf8Error),
Utf8(Utf8Error),
Compression(CompressionError),
Server {
body: ErrorBody,
addr: SocketAddr,
},
Timeout(String),
UnknownConsistency(i16),
UnknownServerEvent(String),
UnexpectedTopologyChangeType(String),
UnexpectedStatusChangeType(String),
UnexpectedSchemaChangeType(String),
UnexpectedSchemaChangeTarget(String),
UnexpectedErrorCode(i32),
UnexpectedWriteType(String),
NonRequestOpcode(Opcode),
NonResponseOpcode(Opcode),
UnexpectedResultKind(i32),
UnexpectedColumnType(i16),
InvalidReplicationFormat {
keyspace: String,
},
UnexpectedAuthResponse(Opcode),
UnexpectedStartupResponse(Opcode),
InvalidProtocol(SocketAddr),
}
Expand description
CDRS custom error type. CDRS expects two types of error - errors returned by Server
and internal errors occurred within the driver itself. Occasionally io::Error
is a type that represent internal error because due to implementation IO errors only
can be raised by CDRS driver. Server
error is an error which are ones returned by
a Server via result error frames.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
Internal IO error.
UuidParse(Error)
Internal error that may be raised during uuid::Uuid::from_bytes
General(String)
General error
FromUtf8(FromUtf8Error)
Internal error that may be raised during String::from_utf8
Utf8(Utf8Error)
Internal error that may be raised during str::from_utf8
Compression(CompressionError)
Internal Compression/Decompression error.
Server
Server error.
Timeout(String)
Timed out waiting for an operation to complete.
UnknownConsistency(i16)
Unknown consistency.
UnknownServerEvent(String)
Unknown server event.
UnexpectedTopologyChangeType(String)
Unexpected topology change event type.
UnexpectedStatusChangeType(String)
Unexpected status change event type.
UnexpectedSchemaChangeType(String)
Unexpected schema change event type.
UnexpectedSchemaChangeTarget(String)
Unexpected schema change event target.
UnexpectedErrorCode(i32)
Unexpected additional error info.
UnexpectedWriteType(String)
Unexpected write type.
NonRequestOpcode(Opcode)
Expected a request opcode, got something else.
NonResponseOpcode(Opcode)
Expected a response opcode, got something else.
UnexpectedResultKind(i32)
Unexpected result kind.
UnexpectedColumnType(i16)
Unexpected column type.
InvalidReplicationFormat
Invalid format found for given keyspace replication strategy.
UnexpectedAuthResponse(Opcode)
Unexpected response to auth message.
UnexpectedStartupResponse(Opcode)
Unexpected startup response.
InvalidProtocol(SocketAddr)
Special error for cases when starting up a connection and protocol negotiation fails. There currently is no explicit server-side code for this, so the information must be inferred from returned error response.