[][src]Trait fbthrift::protocol::ProtocolWriter

pub trait ProtocolWriter {
    type Final;
    pub fn write_message_begin(
        &mut self,
        name: &str,
        type_id: MessageType,
        seqid: u32
    );
pub fn write_message_end(&mut self);
pub fn write_struct_begin(&mut self, name: &str);
pub fn write_struct_end(&mut self);
pub fn write_field_begin(&mut self, name: &str, type_id: TType, id: i16);
pub fn write_field_end(&mut self);
pub fn write_field_stop(&mut self);
pub fn write_map_begin(
        &mut self,
        key_type: TType,
        value_type: TType,
        size: usize
    );
pub fn write_map_key_begin(&mut self);
pub fn write_map_value_begin(&mut self);
pub fn write_map_end(&mut self);
pub fn write_list_begin(&mut self, elem_type: TType, size: usize);
pub fn write_list_value_begin(&mut self);
pub fn write_list_end(&mut self);
pub fn write_set_begin(&mut self, elem_type: TType, size: usize);
pub fn write_set_value_begin(&mut self);
pub fn write_set_end(&mut self);
pub fn write_bool(&mut self, value: bool);
pub fn write_byte(&mut self, value: i8);
pub fn write_i16(&mut self, value: i16);
pub fn write_i32(&mut self, value: i32);
pub fn write_i64(&mut self, value: i64);
pub fn write_double(&mut self, value: f64);
pub fn write_float(&mut self, value: f32);
pub fn write_string(&mut self, value: &str);
pub fn write_binary(&mut self, value: &[u8]);
pub fn finish(self) -> Self::Final; }

Trait for emitting a frame formatted in a given protocol

Associated Types

Loading content...

Required methods

pub fn write_message_begin(
    &mut self,
    name: &str,
    type_id: MessageType,
    seqid: u32
)
[src]

pub fn write_message_end(&mut self)[src]

pub fn write_struct_begin(&mut self, name: &str)[src]

pub fn write_struct_end(&mut self)[src]

pub fn write_field_begin(&mut self, name: &str, type_id: TType, id: i16)[src]

pub fn write_field_end(&mut self)[src]

pub fn write_field_stop(&mut self)[src]

pub fn write_map_begin(
    &mut self,
    key_type: TType,
    value_type: TType,
    size: usize
)
[src]

pub fn write_map_key_begin(&mut self)[src]

pub fn write_map_value_begin(&mut self)[src]

pub fn write_map_end(&mut self)[src]

pub fn write_list_begin(&mut self, elem_type: TType, size: usize)[src]

pub fn write_list_value_begin(&mut self)[src]

pub fn write_list_end(&mut self)[src]

pub fn write_set_begin(&mut self, elem_type: TType, size: usize)[src]

pub fn write_set_value_begin(&mut self)[src]

pub fn write_set_end(&mut self)[src]

pub fn write_bool(&mut self, value: bool)[src]

pub fn write_byte(&mut self, value: i8)[src]

pub fn write_i16(&mut self, value: i16)[src]

pub fn write_i32(&mut self, value: i32)[src]

pub fn write_i64(&mut self, value: i64)[src]

pub fn write_double(&mut self, value: f64)[src]

pub fn write_float(&mut self, value: f32)[src]

pub fn write_string(&mut self, value: &str)[src]

pub fn write_binary(&mut self, value: &[u8])[src]

pub fn finish(self) -> Self::Final[src]

Loading content...

Implementors

impl<B: BufMutExt> ProtocolWriter for BinaryProtocolSerializer<B>[src]

type Final = B::Final

impl<B: BufMutExt> ProtocolWriter for CompactProtocolSerializer<B>[src]

type Final = B::Final

impl<B: BufMutExt> ProtocolWriter for SimpleJsonProtocolSerializer<B>[src]

type Final = B::Final

Loading content...