Module message_io::util::encoding
source · [−]Expand description
Frame encoding to convert a data stream into packets. It can be used as a utility to build adapters.
Structs
Used to decoded messages from several/partial data chunks
Constants
This is the max required bytes to encode a u64 using the varint encoding scheme. It is size 10=ceil(64/7)
Functions
Decodes an encoded value in a buffer. The function returns the message size and the consumed bytes or none if the buffer is too small.
Encode a message, returning the bytes that must be sent before the message. A buffer is used to avoid heap allocation.