pub trait BinProtSerializationType<'de>: Sized {
    type T: From<Self> + Into<Self> + Serialize + Deserialize<'de>;

    fn try_from_binprot(rdr: impl Read) -> Result<Self, Error> { ... }
    fn try_into_binprot(self) -> Result<Vec<u8>, Error> { ... }
}
Expand description

This trait annotates a given type its corresponding bin-prot serialization type,

Required Associated Types

The corresponding serialization type for bin-prot format Self type can be used here to indicate no special convertion is needed TODO: Add default value when the feature lands on stable rust

Provided Methods

Construct from binprot bytes reader

Convert into binprot byte vec

Implementors