Skip to main content

classify_message

Function classify_message 

Source
pub fn classify_message(bytes: Bytes) -> Result<ServerMessage>
Expand description

Classify and parse an incoming server message in a single pass.

Creates one Reader, identifies the root element, then continues parsing with the same reader — no double-parsing.

Takes ownership of Bytes from the codec so that DataPayload can reference the buffer without copying.