pub trait ReadBinProtExt: Read {
    fn bin_read_unit(&mut self) -> Result<()> { ... }
    fn bin_read_bool(&mut self) -> Result<bool> { ... }
    fn bin_read_char(&mut self) -> Result<char> { ... }
    fn bin_read_integer<T: FromPrimitive>(&mut self) -> Result<T> { ... }
    fn bin_read_nat0<T: FromPrimitive + Unsigned>(&mut self) -> Result<T> { ... }
    fn bin_read_variant_index(&mut self) -> Result<u8> { ... }
    fn bin_read_polyvar_tag(&mut self) -> Result<u32> { ... }
    fn bin_read_string(&mut self) -> Result<String> { ... }
    fn bin_read_bytes(&mut self) -> Result<Vec<u8>> { ... }
}
Expand description

Extension trait for readers implementing io::Read to allow them to read a bin_prot encoded values

Provided Methods

Read a unit

Read a bool

Read a single byte as char

Read a variable length integer

Read a variable length natural integer

Read the index of a variant

Read the tag of a polyvar variant (4 bytes) You can convert between ocaml native integer using (x << 1 | 1)

Read a string

read some bytes

Implementors

All types that implement Read get methods defined in ReadBinProtIntegerExt for free.