Module enc

Module enc 

Source

Structs§

CobsEncoder
The CobsEncoder type is used to encode a stream of bytes to a given mutable output slice. This is often useful when heap data structures are not available, or when not all message bytes are received at a single point in time.
DestBufTooSmallError
EncoderState
The EncoderState is used to track the current state of a streaming encoder. This struct does not contain the output buffer (or a reference to one), and can be used when streaming the encoded output to a custom data type

Enums§

PushResult
PushResult is used to represent the changes to an (encoded) output data buffer when an unencoded byte is pushed into EncoderState.

Functions§

encode
Encodes the source buffer into the dest buffer.
encode_with_sentinel
Encodes the source buffer into the dest buffer using an arbitrary sentinel value.
try_encode
Attempts to encode the source buffer into the dest buffer.