pub struct TCompactOutputProtocol<T>
where T: Write,
{ /* private fields */ }
Expand description

Write messages using the Thrift compact protocol.

Implementations§

source§

impl<T> TCompactOutputProtocol<T>
where T: Write,

source

pub fn new(transport: T) -> TCompactOutputProtocol<T>

Create a TCompactOutputProtocol that writes bytes to transport.

Trait Implementations§

source§

impl<T> Debug for TCompactOutputProtocol<T>
where T: Write + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> TOutputProtocol for TCompactOutputProtocol<T>
where T: Write,

source§

fn write_message_begin( &mut self, identifier: &TMessageIdentifier ) -> Result<usize>

Write the beginning of a Thrift message.
source§

fn write_message_end(&mut self) -> Result<usize>

Write the end of a Thrift message.
source§

fn write_struct_begin(&mut self, _: &TStructIdentifier) -> Result<usize>

Write the beginning of a Thrift struct.
source§

fn write_struct_end(&mut self) -> Result<usize>

Write the end of a Thrift struct.
source§

fn write_field_begin(&mut self, identifier: &TFieldIdentifier) -> Result<usize>

Write the beginning of a Thrift field.
source§

fn write_field_end(&mut self) -> Result<usize>

Write the end of a Thrift field.
source§

fn write_field_stop(&mut self) -> Result<usize>

Write a STOP field indicating that all the fields in a struct have been written.
source§

fn write_bool(&mut self, b: bool) -> Result<usize>

Write a bool.
source§

fn write_bytes(&mut self, b: &[u8]) -> Result<usize>

Write a fixed-length byte array.
source§

fn write_i8(&mut self, i: i8) -> Result<usize>

Write an 8-bit signed integer.
source§

fn write_i16(&mut self, i: i16) -> Result<usize>

Write a 16-bit signed integer.
source§

fn write_i32(&mut self, i: i32) -> Result<usize>

Write a 32-bit signed integer.
source§

fn write_i64(&mut self, i: i64) -> Result<usize>

Write a 64-bit signed integer.
source§

fn write_double(&mut self, d: f64) -> Result<usize>

Write a 64-bit float.
source§

fn write_string(&mut self, s: &str) -> Result<usize>

Write a fixed-length string.
source§

fn write_list_begin(&mut self, identifier: &TListIdentifier) -> Result<usize>

Write the beginning of a list.
source§

fn write_list_end(&mut self) -> Result<usize>

Write the end of a list.
source§

fn write_set_begin(&mut self, identifier: &TSetIdentifier) -> Result<usize>

Write the beginning of a set.
source§

fn write_set_end(&mut self) -> Result<usize>

Write the end of a set.
source§

fn write_map_begin(&mut self, identifier: &TMapIdentifier) -> Result<usize>

Write the beginning of a map.
source§

fn write_map_end(&mut self) -> Result<usize>

Write the end of a map.
source§

fn flush(&mut self) -> Result<()>

Flush buffered bytes to the underlying transport.
source§

fn write_byte(&mut self, b: u8) -> Result<usize>

Write an unsigned byte. Read more

Auto Trait Implementations§

§

impl<T> Freeze for TCompactOutputProtocol<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for TCompactOutputProtocol<T>
where T: RefUnwindSafe,

§

impl<T> Send for TCompactOutputProtocol<T>
where T: Send,

§

impl<T> Sync for TCompactOutputProtocol<T>
where T: Sync,

§

impl<T> Unpin for TCompactOutputProtocol<T>
where T: Unpin,

§

impl<T> UnwindSafe for TCompactOutputProtocol<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.