[−][src]Struct thrift::protocol::TCompactOutputProtocol
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();
Methods
impl<T> TCompactOutputProtocol<T> where
T: TWriteTransport,
[src]
T: TWriteTransport,
pub fn new(transport: T) -> TCompactOutputProtocol<T>
[src]
Create a TCompactOutputProtocol
that writes bytes to transport
.
Trait Implementations
impl<T> TOutputProtocol for TCompactOutputProtocol<T> where
T: TWriteTransport,
[src]
T: TWriteTransport,
fn write_message_begin(&mut self, identifier: &TMessageIdentifier) -> Result<()>
[src]
fn write_message_end(&mut self) -> Result<()>
[src]
fn write_struct_begin(&mut self, _: &TStructIdentifier) -> Result<()>
[src]
fn write_struct_end(&mut self) -> Result<()>
[src]
fn write_field_begin(&mut self, identifier: &TFieldIdentifier) -> Result<()>
[src]
fn write_field_end(&mut self) -> Result<()>
[src]
fn write_field_stop(&mut self) -> Result<()>
[src]
fn write_bool(&mut self, b: bool) -> Result<()>
[src]
fn write_bytes(&mut self, b: &[u8]) -> Result<()>
[src]
fn write_i8(&mut self, i: i8) -> Result<()>
[src]
fn write_i16(&mut self, i: i16) -> Result<()>
[src]
fn write_i32(&mut self, i: i32) -> Result<()>
[src]
fn write_i64(&mut self, i: i64) -> Result<()>
[src]
fn write_double(&mut self, d: f64) -> Result<()>
[src]
fn write_string(&mut self, s: &str) -> Result<()>
[src]
fn write_list_begin(&mut self, identifier: &TListIdentifier) -> Result<()>
[src]
fn write_list_end(&mut self) -> Result<()>
[src]
fn write_set_begin(&mut self, identifier: &TSetIdentifier) -> Result<()>
[src]
fn write_set_end(&mut self) -> Result<()>
[src]
fn write_map_begin(&mut self, identifier: &TMapIdentifier) -> Result<()>
[src]
fn write_map_end(&mut self) -> Result<()>
[src]
fn flush(&mut self) -> Result<()>
[src]
fn write_byte(&mut self, b: u8) -> Result<()>
[src]
impl<T: Debug> Debug for TCompactOutputProtocol<T> where
T: TWriteTransport,
[src]
T: TWriteTransport,
Auto Trait Implementations
impl<T> Send for TCompactOutputProtocol<T> where
T: Send,
T: Send,
impl<T> Sync for TCompactOutputProtocol<T> where
T: Sync,
T: Sync,
impl<T> Unpin for TCompactOutputProtocol<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for TCompactOutputProtocol<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for TCompactOutputProtocol<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,