Module codec

Module codec 

Source

Structs§

Reader
Read from a byte slice.
u24

Traits§

Codec
Things we can encode and read from a Reader, Sized version. Easier to work with when types are instantiated, for example in protocol crates such as tlspuffin.
CodecP
Things we can encode and read from a Reader. Used by puffin as it does not require to be Sized (we rely on <dyn T> for T:CodecP.
VecCodecWoSize
Trait for data whose Vectors are encoded without length prefix

Functions§

compare_encoding
decode_u8 🔒
decode_u16
decode_u32
decode_u64
encode_vec_u8
encode a Vec whose length is encoded in 1 byte
encode_vec_u16
encode a Vec whose length is encoded in 2 bytes
encode_vec_u24
encode a Vec whose length is encoded in 3 bytes
put_u16
put_u64
read_vec_u8
read_vec_u16
read_vec_u24_limited