Skip to main content

try_decode_message

Function try_decode_message 

Source
pub fn try_decode_message(
    input: &[u8],
) -> Result<Option<PacketMessage>, PacketFrameError>
Expand description

Tries to decode one complete TDS message from the front of input.

Returns Ok(None) when the buffer does not yet contain a full packet or a packet marked END_OF_MESSAGE. On success, PacketMessage::consumed identifies how many bytes can be removed from the caller’s receive buffer.