pub enum ResponseBody {
Show 16 variants
Error(CDRSError),
Startup,
Ready(BodyResResultVoid),
Authenticate(BodyResAuthenticate),
Options,
Supported(BodyResSupported),
Query,
Result(ResResultBody),
Prepare,
Execute,
Register,
Event(BodyResEvent),
Batch,
AuthChallenge(BodyResAuthChallenge),
AuthResponse,
AuthSuccess(BodyReqAuthSuccess),
}Variants§
Error(CDRSError)
Startup
Ready(BodyResResultVoid)
Authenticate(BodyResAuthenticate)
Options
Supported(BodyResSupported)
Query
Result(ResResultBody)
Prepare
Execute
Register
Event(BodyResEvent)
Batch
AuthChallenge(BodyResAuthChallenge)
AuthResponse
AuthSuccess(BodyReqAuthSuccess)
Implementations§
Source§impl ResponseBody
impl ResponseBody
pub fn from(bytes: &[u8], response_type: &Opcode) -> 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>
It unwraps body and returns BodyResResultPrepared which contains an exact result of
PREPARE query. If frame body is not of type Result this method returns None.
Sourcepub fn into_set_keyspace(self) -> Option<BodyResResultSetKeyspace>
pub fn into_set_keyspace(self) -> Option<BodyResResultSetKeyspace>
It unwraps body and returns BodyResResultPrepared which contains an exact result of
use keyspace query. If frame body is not of type Result this method returns None.
Sourcepub fn into_server_event(self) -> Option<BodyResEvent>
pub fn into_server_event(self) -> Option<BodyResEvent>
It unwraps body and returns BodyResEvent.
If frame body is not of type Result this method returns None.
pub fn get_authenticator<'a>(&'a self) -> Option<&'a str>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResponseBody
impl RefUnwindSafe for ResponseBody
impl Send for ResponseBody
impl Sync for ResponseBody
impl Unpin for ResponseBody
impl UnwindSafe for ResponseBody
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
Mutably borrows from an owned value. Read more