Struct cdrs::frame::Frame [−][src]
pub struct Frame { pub version: Version, pub flags: Vec<Flag>, pub opcode: Opcode, pub stream: u16, pub body: Vec<u8>, pub tracing_id: Option<Uuid>, pub warnings: Vec<String>, }
Fields
version: Version
flags: Vec<Flag>
opcode: Opcode
stream: u16
body: Vec<u8>
tracing_id: Option<Uuid>
warnings: Vec<String>
Methods
impl Frame
[src]
impl Frame
pub fn new_req_auth_response(bytes: Vec<u8>) -> Frame
[src]
pub fn new_req_auth_response(bytes: Vec<u8>) -> Frame
Creates new frame of type AuthResponse
.
impl Frame
[src]
impl Frame
pub fn new_req_batch(query: BodyReqBatch, flags: Vec<Flag>) -> Frame
[src]
pub fn new_req_batch(query: BodyReqBatch, flags: Vec<Flag>) -> Frame
Note: This function should be used internally for building query request frames.
impl Frame
[src]
impl Frame
pub fn new_req_execute(
id: &CBytesShort,
query_parameters: QueryParams,
flags: Vec<Flag>
) -> Frame
[src]
pub fn new_req_execute(
id: &CBytesShort,
query_parameters: QueryParams,
flags: Vec<Flag>
) -> Frame
Note: This function should be used internally for building query request frames.
impl Frame
[src]
impl Frame
pub fn new_req_options() -> Frame
[src]
pub fn new_req_options() -> Frame
Creates new frame of type options
.
impl Frame
[src]
impl Frame
pub fn new_req_prepare(query: String, flags: Vec<Flag>) -> Frame
[src]
pub fn new_req_prepare(query: String, flags: Vec<Flag>) -> Frame
Note: This function should be used internally for building query request frames.
impl Frame
[src]
impl Frame
pub fn new_req_query(
query: String,
consistency: Consistency,
values: Option<QueryValues>,
with_names: Option<bool>,
page_size: Option<i32>,
paging_state: Option<CBytes>,
serial_consistency: Option<Consistency>,
timestamp: Option<i64>,
flags: Vec<Flag>
) -> Frame
[src]
pub fn new_req_query(
query: String,
consistency: Consistency,
values: Option<QueryValues>,
with_names: Option<bool>,
page_size: Option<i32>,
paging_state: Option<CBytes>,
serial_consistency: Option<Consistency>,
timestamp: Option<i64>,
flags: Vec<Flag>
) -> Frame
Note: This function should be used internally for building query request frames.
pub fn new_query(query: Query, flags: Vec<Flag>) -> Frame
[src]
pub fn new_query(query: Query, flags: Vec<Flag>) -> Frame
Note: This function should be used internally for building query request frames.
impl Frame
[src]
impl Frame
pub fn new_req_register(events: Vec<SimpleServerEvent>) -> Frame
[src]
pub fn new_req_register(events: Vec<SimpleServerEvent>) -> Frame
Creates new frame of type REGISTER
.
impl Frame
[src]
impl Frame
pub fn new_req_startup(compression: Option<&str>) -> Frame
[src]
pub fn new_req_startup(compression: Option<&str>) -> Frame
Creates new frame of type startup
.
impl Frame
[src]
impl Frame
pub fn get_body(&self) -> Result<ResponseBody>
[src]
pub fn get_body(&self) -> Result<ResponseBody>
pub fn tracing_id(&self) -> &Option<Uuid>
[src]
pub fn tracing_id(&self) -> &Option<Uuid>
pub fn warnings(&self) -> &Vec<String>
[src]
pub fn warnings(&self) -> &Vec<String>
pub fn encode_with(self, compressor: Compression) -> Result<Vec<u8>>
[src]
pub fn encode_with(self, compressor: Compression) -> Result<Vec<u8>>
Trait Implementations
impl Debug for Frame
[src]
impl Debug for Frame
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a> IntoBytes for Frame
[src]
impl<'a> IntoBytes for Frame
fn into_cbytes(&self) -> Vec<u8>
[src]
fn into_cbytes(&self) -> Vec<u8>
It should convert a struct into an array of bytes.