Trait parquet::thrift::TSerializable
source · pub trait TSerializable: Sized {
// Required methods
fn read_from_in_protocol<T: TInputProtocol>(i_prot: &mut T) -> Result<Self>;
fn write_to_out_protocol<T: TOutputProtocol>(
&self,
o_prot: &mut T,
) -> Result<()>;
}
Expand description
Reads and writes the struct to Thrift protocols.
Unlike thrift::protocol::TSerializable
this uses generics instead of trait objects
Required Methods§
sourcefn read_from_in_protocol<T: TInputProtocol>(i_prot: &mut T) -> Result<Self>
fn read_from_in_protocol<T: TInputProtocol>(i_prot: &mut T) -> Result<Self>
Reads the struct from the input Thrift protocol
sourcefn write_to_out_protocol<T: TOutputProtocol>(
&self,
o_prot: &mut T,
) -> Result<()>
fn write_to_out_protocol<T: TOutputProtocol>( &self, o_prot: &mut T, ) -> Result<()>
Writes the struct to the output Thrift protocol
Object Safety§
This trait is not object safe.