#[non_exhaustive]pub enum CqlRequestKind {
Startup,
AuthResponse,
Options,
Query,
Prepare,
Execute,
Batch,
Register,
}
Expand description
Possible requests sent by the client.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Startup
Initialize the connection. The server will respond by either a READY message (in which case the connection is ready for queries) or an AUTHENTICATE message (in which case credentials will need to be provided using AUTH_RESPONSE).
This must be the first message of the connection, except for OPTIONS that can be sent before to find out the options supported by the server. Once the connection has been initialized, a client should not send any more STARTUP messages.
AuthResponse
Answers a server authentication challenge. Authentication in the protocol is SASL based. The server sends authentication challenges (a bytes token) to which the client answers with this message. Those exchanges continue until the server accepts the authentication by sending a AUTH_SUCCESS message after a client AUTH_RESPONSE. Note that the exchange begins with the client sending an initial AUTH_RESPONSE in response to a server AUTHENTICATE request.
The response to a AUTH_RESPONSE is either a follow-up AUTH_CHALLENGE message, an AUTH_SUCCESS message or an ERROR message.
Options
Asks the server to return which STARTUP options are supported. The server will respond with a SUPPORTED message.
Query
Performs a CQL query, i.e., executes an unprepared statement. The server will respond to a QUERY message with a RESULT message, the content of which depends on the query.
Prepare
Prepares a query for later execution (through EXECUTE). The server will respond with a RESULT::Prepared message.
Execute
Executes a prepared query. The response from the server will be a RESULT message.
Batch
Allows executing a list of queries (prepared or not) as a batch (note that only DML statements are accepted in a batch). The server will respond with a RESULT message.
Register
Register this connection to receive some types of events. The response to a REGISTER message will be a READY message.
Trait Implementations§
Source§impl Clone for CqlRequestKind
impl Clone for CqlRequestKind
Source§fn clone(&self) -> CqlRequestKind
fn clone(&self) -> CqlRequestKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CqlRequestKind
impl Debug for CqlRequestKind
Source§impl Display for CqlRequestKind
impl Display for CqlRequestKind
impl Copy for CqlRequestKind
Auto Trait Implementations§
impl Freeze for CqlRequestKind
impl RefUnwindSafe for CqlRequestKind
impl Send for CqlRequestKind
impl Sync for CqlRequestKind
impl Unpin for CqlRequestKind
impl UnwindSafe for CqlRequestKind
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