Struct tockloader_proto::ResponseDecoder [] [src]

pub struct ResponseDecoder { /* fields omitted */ }

The ResponseDecoder takes bytes and gives you Responsess.

Methods

impl ResponseDecoder
[src]

[src]

Create a new ResponseDecoder.

The decoder is fed bytes with the receive method.

[src]

Decode a whole buffers worth of bytes.

Due to lifetime problems, the decoded Responses are sent via callback rather than being returned.

[src]

Empty the RX buffer.

[src]

Process incoming bytes.

The decoder is fed bytes with the receive method. If not enough bytes have been seen, this function returns None. Once enough bytes have been seen, it returns Some(Response) containing the decoded Response.

[src]

Set the expected length of an unbounded message. This depends entirely on the last command you sent.