Enum cassandra_protocol::error::Error
source · [−]pub enum Error {
Show 23 variants
Io(Error),
UuidParse(UuidError),
General(String),
FromUtf8(FromUtf8Error),
Utf8(Utf8Error),
Compression(CompressionError),
Server {
body: ErrorBody,
addr: SocketAddr,
},
Timeout(String),
UnknownConsistency(CIntShort),
UnknownServerEvent(String),
UnexpectedTopologyChangeType(String),
UnexpectedStatusChangeType(String),
UnexpectedSchemaChangeType(String),
UnexpectedSchemaChangeTarget(String),
UnexpectedAdditionalErrorInfo(CInt),
UnexpectedWriteType(String),
NonRequestOpcode(Opcode),
NonResponseOpcode(Opcode),
UnexpectedResultKind(CInt),
UnexpectedColumnType(CIntShort),
InvalidReplicationFormat {
keyspace: String,
},
UnexpectedAuthResponse(Opcode),
UnexpectedStartupResponse(Opcode),
}
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
Io(Error)
Internal IO error.
UuidParse(UuidError)
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(CIntShort)
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.
UnexpectedAdditionalErrorInfo(CInt)
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(CInt)
Unexpected result kind.
UnexpectedColumnType(CIntShort)
Unexpected column type.
InvalidReplicationFormat
Fields
keyspace: String
Invalid format found for given keyspace replication strategy.
UnexpectedAuthResponse(Opcode)
Unexpected response to auth message.
UnexpectedStartupResponse(Opcode)
Unexpected startup response.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()