[][src]Struct cdrs::frame::Frame

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: Versionflags: Vec<Flag>opcode: Opcodestream: u16body: Vec<u8>tracing_id: Option<Uuid>warnings: Vec<String>

Methods

impl Frame[src]

pub fn new_req_auth_response(bytes: Vec<u8>) -> Frame[src]

Creates new frame of type AuthResponse.

impl Frame[src]

pub fn new_req_batch(query: BodyReqBatch, flags: Vec<Flag>) -> Frame[src]

Note: This function should be used internally for building query request frames.

impl Frame[src]

pub fn new_req_execute(
    id: &CBytesShort,
    query_parameters: QueryParams,
    flags: Vec<Flag>
) -> Frame
[src]

Note: This function should be used internally for building query request frames.

impl Frame[src]

pub fn new_req_options() -> Frame[src]

Creates new frame of type options.

impl Frame[src]

pub fn new_req_prepare(query: String, flags: Vec<Flag>) -> Frame[src]

Note: This function should be used internally for building query request frames.

impl 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
[src]

Note: This function should be used internally for building query request frames.

pub fn new_query(query: Query, flags: Vec<Flag>) -> Frame[src]

Note: This function should be used internally for building query request frames.

impl Frame[src]

pub fn new_req_register(events: Vec<SimpleServerEvent>) -> Frame[src]

Creates new frame of type REGISTER.

impl Frame[src]

pub fn new_req_startup(compression: Option<&str>) -> Frame[src]

Creates new frame of type startup.

impl Frame[src]

pub fn get_body(&self) -> Result<ResponseBody>[src]

pub fn tracing_id(&self) -> &Option<Uuid>[src]

pub fn warnings(&self) -> &Vec<String>[src]

pub fn encode_with(self, compressor: Compression) -> Result<Vec<u8>>[src]

Trait Implementations

impl<'a> IntoBytes for Frame[src]

impl Debug for Frame[src]

Auto Trait Implementations

impl Send for Frame

impl Unpin for Frame

impl Sync for Frame

impl UnwindSafe for Frame

impl RefUnwindSafe for Frame

Blanket Implementations

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.

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

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

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