pub trait ExtensionDecoder {
    type Error: 'static + Error + Send + Sync;
    fn decode(
        &mut self,
        payload: &mut BytesMut,
        header: &mut FrameHeader
    ) -> Result<(), Self::Error>; }
Expand description

A per-message frame decoder.

Associated Types

The error type produced by this extension if decoding fails.

Required methods

Invoked when a frame has been received.

Continuation frames

If this frame is not final or a continuation frame then payload will contain all of the data received up to and including this frame.

Note

If a condition is not met an implementation may opt to not decode this frame; such as the payload length not being large enough to require decoding.

Implementors