pub struct Cobs<B> where
    B: Flavor + IndexMut<usize, Output = u8>, 
{ /* private fields */ }
Expand description

The Cobs flavor implements Consistent Overhead Byte Stuffing on the serialized data. The output of this flavor includes the termination/sentinel byte of 0x00.

This protocol is useful when sending data over a serial interface without framing such as a UART

Implementations

Create a new Cobs modifier Flavor. If there is insufficient space to push the leading header byte, the method will return an Error

Trait Implementations

The Output type is what this storage “resolves” to when the serialization is complete, such as a slice or a Vec of some sort. Read more

The try_push() trait method can be used to push a single byte to be modified and/or stored

Finalize the serialization process

The try_extend() trait method can be implemented when there is a more efficient way of processing multiple bytes at once, such as copying a slice to the output, rather than iterating over one byte at a time. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.