Struct postcard_cobs::EncoderState [−][src]
pub struct EncoderState { /* fields omitted */ }
Expand description
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
IMPORTANT NOTE: When implementing a custom streaming encoder,
the EncoderState
state machine assumes that the output buffer
ALREADY contains a single placeholder byte, and no other bytes.
This placeholder byte will be later modified with the first distance
to the next header/zero byte.
Implementations
Push a single unencoded byte into the encoder state machine