pub trait BinProtSerializationType<'de> {
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, Global>, Error> { ... }
}
Expand description
Re-export serialization type annotations This trait annotates a given type its corresponding bin-prot serialization type,
Required Associated Types
type T: From<Self> + Into<Self> + Serialize + Deserialize<'de>
type T: From<Self> + Into<Self> + Serialize + Deserialize<'de>
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
fn try_from_binprot(rdr: impl Read) -> Result<Self, Error>
fn try_from_binprot(rdr: impl Read) -> Result<Self, Error>
Construct from binprot bytes reader
fn try_into_binprot(self) -> Result<Vec<u8, Global>, Error>
fn try_into_binprot(self) -> Result<Vec<u8, Global>, Error>
Convert into binprot byte vec