#[non_exhaustive]pub enum CqlResponseKind {
Error,
Ready,
Authenticate,
Supported,
Result,
Event,
AuthChallenge,
AuthSuccess,
}
Expand description
Possible CQL responses received from the server
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Error
Indicates an error processing a request.
Ready
Indicates that the server is ready to process queries. This message will be sent by the server either after a STARTUP message if no authentication is required (if authentication is required, the server indicates readiness by sending a AUTH_RESPONSE message).
Authenticate
Indicates that the server requires authentication, and which authentication mechanism to use. The authentication is SASL based and thus consists of a number of server challenges (AUTH_CHALLENGE) followed by client responses (AUTH_RESPONSE). The initial exchange is however bootstrapped by an initial client response. The details of that exchange (including how many challenge-response pairs are required) are specific to the authenticator in use. The exchange ends when the server sends an AUTH_SUCCESS message or an ERROR message.
This message will be sent following a STARTUP message if authentication is required and must be answered by a AUTH_RESPONSE message from the client.
Supported
Indicates which startup options are supported by the server. This message comes as a response to an OPTIONS message.
Result
The result to a query (QUERY, PREPARE, EXECUTE or BATCH messages). It has multiple kinds:
- Void: for results carrying no information.
- Rows: for results to select queries, returning a set of rows.
- Set_keyspace: the result to a
USE
statement. - Prepared: result to a PREPARE message.
- Schema_change: the result to a schema altering statement.
Event
An event pushed by the server. A client will only receive events for the types it has REGISTER-ed to. The valid event types are:
- “TOPOLOGY_CHANGE”: events related to change in the cluster topology. Currently, events are sent when new nodes are added to the cluster, and when nodes are removed.
- “STATUS_CHANGE”: events related to change of node status. Currently, up/down events are sent.
- “SCHEMA_CHANGE”: events related to schema change. The type of changed involved may be one of “CREATED”, “UPDATED” or “DROPPED”.
AuthChallenge
A server authentication challenge (see AUTH_RESPONSE for more details). Clients are expected to answer the server challenge with an AUTH_RESPONSE message.
AuthSuccess
Indicates the success of the authentication phase.
Trait Implementations§
Source§impl Clone for CqlResponseKind
impl Clone for CqlResponseKind
Source§fn clone(&self) -> CqlResponseKind
fn clone(&self) -> CqlResponseKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CqlResponseKind
impl Debug for CqlResponseKind
Source§impl Display for CqlResponseKind
impl Display for CqlResponseKind
impl Copy for CqlResponseKind
Auto Trait Implementations§
impl Freeze for CqlResponseKind
impl RefUnwindSafe for CqlResponseKind
impl Send for CqlResponseKind
impl Sync for CqlResponseKind
impl Unpin for CqlResponseKind
impl UnwindSafe for CqlResponseKind
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§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