#[non_exhaustive]
pub enum ResponseBody {
Error(ErrorBody),
Ready,
Authenticate(BodyResAuthenticate),
Supported(BodyResSupported),
Result(ResResultBody),
Event(BodyResEvent),
AuthChallenge(BodyResAuthChallenge),
AuthSuccess(BodyReqAuthSuccess),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Error(ErrorBody)
Ready
Authenticate(BodyResAuthenticate)
Supported(BodyResSupported)
Result(ResResultBody)
Event(BodyResEvent)
AuthChallenge(BodyResAuthChallenge)
AuthSuccess(BodyReqAuthSuccess)
Implementations§
source§impl ResponseBody
impl ResponseBody
pub fn try_from( bytes: &[u8], response_type: Opcode, version: Version ) -> Result<ResponseBody>
pub fn into_rows(self) -> Option<Vec<Row>>
pub fn as_rows_metadata(&self) -> Option<&RowsMetadata>
pub fn as_cols(&self) -> Option<&BodyResResultRows>
sourcepub fn into_prepared(self) -> Option<BodyResResultPrepared>
pub fn into_prepared(self) -> Option<BodyResResultPrepared>
Unwraps body and returns BodyResResultPrepared which contains an exact result of PREPARE query.
sourcepub fn into_set_keyspace(self) -> Option<BodyResResultSetKeyspace>
pub fn into_set_keyspace(self) -> Option<BodyResResultSetKeyspace>
Unwraps body and returns BodyResResultPrepared which contains an exact result of use keyspace query.
sourcepub fn into_server_event(self) -> Option<BodyResEvent>
pub fn into_server_event(self) -> Option<BodyResEvent>
Unwraps body and returns BodyResEvent.
pub fn authenticator(&self) -> Option<&str>
pub fn into_error(self) -> Option<ErrorBody>
Trait Implementations§
source§impl Clone for ResponseBody
impl Clone for ResponseBody
source§fn clone(&self) -> ResponseBody
fn clone(&self) -> ResponseBody
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ResponseBody
impl Debug for ResponseBody
source§impl PartialEq<ResponseBody> for ResponseBody
impl PartialEq<ResponseBody> for ResponseBody
source§fn eq(&self, other: &ResponseBody) -> bool
fn eq(&self, other: &ResponseBody) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.