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
Provided Methods
sourcefn try_from_binprot(rdr: impl Read) -> Result<Self, Error>
fn try_from_binprot(rdr: impl Read) -> Result<Self, Error>
Construct from binprot bytes reader
sourcefn try_into_binprot(self) -> Result<Vec<u8>, Error>
fn try_into_binprot(self) -> Result<Vec<u8>, Error>
Convert into binprot byte vec