Enum cdrs::frame::frame_result::ResResultBody
[−]
[src]
pub enum ResResultBody { Void(BodyResResultVoid), Rows(BodyResResultRows), SetKeyspace(BodyResResultSetKeyspace), Prepared(BodyResResultPrepared), SchemaChange(BodyResResultSchemaChange), }
ResponseBody is a generalized enum that represents all types of responses. Each of enum option wraps related body type.
Variants
Void(BodyResResultVoid)
Void response body. It's an empty stuct.
Rows(BodyResResultRows)
Rows response body. It represents a body of response which contains rows.
SetKeyspace(BodyResResultSetKeyspace)
Set keyspace body. It represents a body of set_keyspace query and usually contains a name of just set namespace.
Prepared(BodyResResultPrepared)
Prepared response body.
SchemaChange(BodyResResultSchemaChange)
Schema change body
Methods
impl ResResultBody
[src]
fn parse_body(cursor: &mut Cursor<Vec<u8>>,
result_kind: ResultKind)
-> ResResultBody
result_kind: ResultKind)
-> ResResultBody
fn parse_body_from_cursor(cursor: &mut Cursor<Vec<u8>>,
result_kind: ResultKind)
-> ResResultBody
result_kind: ResultKind)
-> ResResultBody
It retrieves ResResultBody
from io::Cursor
having knowledge about expected kind of result.
fn into_rows(self) -> Option<Vec<Row>>
It converts body into Vec<Row>
if body's type is Row
and returns None
otherwise.
Trait Implementations
impl Debug for ResResultBody
[src]
impl FromCursor for ResResultBody
[src]
fn from_cursor(cursor: &mut Cursor<Vec<u8>>) -> ResResultBody
It should return an implementor from an io::Cursor
over an array of bytes.