Struct parquet::thrift::TCompactOutputProtocol
source · pub struct TCompactOutputProtocol<T>where
T: TWriteTransport,{ /* private fields */ }
Expand description
Write messages using the Thrift compact protocol.
§Examples
Create and use a TCompactOutputProtocol
.
use thrift::protocol::{TCompactOutputProtocol, TOutputProtocol};
use thrift::transport::TTcpChannel;
let mut channel = TTcpChannel::new();
channel.open("localhost:9090").unwrap();
let mut protocol = TCompactOutputProtocol::new(channel);
protocol.write_bool(true).unwrap();
protocol.write_string("test_string").unwrap();
Implementations§
source§impl<T> TCompactOutputProtocol<T>where
T: TWriteTransport,
impl<T> TCompactOutputProtocol<T>where
T: TWriteTransport,
sourcepub fn new(transport: T) -> TCompactOutputProtocol<T>
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: Debug + TWriteTransport,
impl<T> Debug for TCompactOutputProtocol<T>where
T: Debug + TWriteTransport,
source§impl<T> TOutputProtocol for TCompactOutputProtocol<T>where
T: TWriteTransport,
impl<T> TOutputProtocol for TCompactOutputProtocol<T>where
T: TWriteTransport,
source§fn write_message_begin(
&mut self,
identifier: &TMessageIdentifier,
) -> Result<(), Error>
fn write_message_begin( &mut self, identifier: &TMessageIdentifier, ) -> Result<(), Error>
Write the beginning of a Thrift message.
source§fn write_struct_begin(&mut self, _: &TStructIdentifier) -> Result<(), Error>
fn write_struct_begin(&mut self, _: &TStructIdentifier) -> Result<(), Error>
Write the beginning of a Thrift struct.
source§fn write_field_begin(
&mut self,
identifier: &TFieldIdentifier,
) -> Result<(), Error>
fn write_field_begin( &mut self, identifier: &TFieldIdentifier, ) -> Result<(), Error>
Write the beginning of a Thrift field.
source§fn write_field_stop(&mut self) -> Result<(), Error>
fn write_field_stop(&mut self) -> Result<(), Error>
Write a STOP field indicating that all the fields in a struct have been
written.
source§fn write_list_begin(
&mut self,
identifier: &TListIdentifier,
) -> Result<(), Error>
fn write_list_begin( &mut self, identifier: &TListIdentifier, ) -> Result<(), Error>
Write the beginning of a list.
source§fn write_set_begin(&mut self, identifier: &TSetIdentifier) -> Result<(), Error>
fn write_set_begin(&mut self, identifier: &TSetIdentifier) -> Result<(), Error>
Write the beginning of a set.
source§fn write_map_begin(&mut self, identifier: &TMapIdentifier) -> Result<(), Error>
fn write_map_begin(&mut self, identifier: &TMapIdentifier) -> Result<(), Error>
Write the beginning of a map.
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more