pub enum Response {
Error(Error),
Ready,
Result(Result),
Authenticate(Authenticate),
AuthSuccess(AuthSuccess),
AuthChallenge(AuthChallenge),
Supported(Supported),
Event(Event),
}
Expand description
A CQL response that has been received from the server.
Variants§
Error(Error)
ERROR response, returned by the server when an error occurs.
Ready
READY response, indicating that the server is ready to process requests, typically after a connection is established.
Result(Result)
RESULT response, containing the result of a statement execution.
Authenticate(Authenticate)
AUTHENTICATE response, indicating that the server requires authentication.
AuthSuccess(AuthSuccess)
AUTH_SUCCESS response, indicating that the authentication was successful.
AuthChallenge(AuthChallenge)
AUTH_CHALLENGE response, indicating that the server requires further authentication.
Supported(Supported)
SUPPORTED response, containing the features supported by the server.
Event(Event)
EVENT response, containing an event that occurred on the server.
Implementations§
Source§impl Response
impl Response
Sourcepub fn to_response_kind(&self) -> CqlResponseKind
pub fn to_response_kind(&self) -> CqlResponseKind
Returns the kind of this response.
Sourcepub fn deserialize(
features: &ProtocolFeatures,
opcode: ResponseOpcode,
buf_bytes: Bytes,
cached_metadata: Option<&Arc<ResultMetadata<'static>>>,
) -> Result<Response, CqlResponseParseError>
pub fn deserialize( features: &ProtocolFeatures, opcode: ResponseOpcode, buf_bytes: Bytes, cached_metadata: Option<&Arc<ResultMetadata<'static>>>, ) -> Result<Response, CqlResponseParseError>
Deserialize a response from the given bytes.
Sourcepub fn into_non_error_response(self) -> Result<NonErrorResponse, Error>
pub fn into_non_error_response(self) -> Result<NonErrorResponse, Error>
Converts this response into a NonErrorResponse
, returning an error if it is an Error
response.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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> 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