[][src]Enum cdrs_tokio::frame::frame_result::ResResultBody

pub enum ResResultBody {
    Void(BodyResResultVoid),
    Rows(BodyResResultRows),
    SetKeyspace(BodyResResultSetKeyspace),
    Prepared(BodyResResultPrepared),
    SchemaChange(SchemaChange),
}

ResponseBody is a generalized enum that represents all types of responses. Each of enum option wraps related body type.

Variants

Void response body. It's an empty stuct.

Rows response body. It represents a body of response which contains rows.

Set keyspace body. It represents a body of set_keyspace query and usually contains a name of just set namespace.

Prepared response body.

SchemaChange(SchemaChange)

Schema change body

Implementations

impl ResResultBody[src]

pub fn into_rows(self) -> Option<Vec<Row>>[src]

It converts body into Vec<Row> if body's type is Row and returns None otherwise.

pub fn as_rows_metadata(&self) -> Option<RowsMetadata>[src]

It returns Some rows metadata if frame result is of type rows and None othewise

pub fn into_prepared(self) -> Option<BodyResResultPrepared>[src]

It unwraps body and returns BodyResResultPrepared which contains an exact result of PREPARE query.

pub fn into_set_keyspace(self) -> Option<BodyResResultSetKeyspace>[src]

It unwraps body and returns BodyResResultSetKeyspace which contains an exact result of use keyspace query.

Trait Implementations

impl Debug for ResResultBody[src]

impl FromCursor for ResResultBody[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.