Skip to main content

decode_datagram

Function decode_datagram 

Source
pub fn decode_datagram<T: Framer>(
    datagram: Bytes,
) -> Result<Frame<T>, SessionError>
Expand description

r[impl jetstream.session.datagrams] Decode one datagram, which carries a complete frame or is discarded. There is nothing to reassemble it from, so bytes after the frame mean it is not a complete frame either: decoding would succeed on the prefix and hand back something the peer never sent.