oa_gateway_owp::codec

Function parse_client

Source
pub fn parse_client(frame: &str) -> Result<ClientOp, ParseError>
Expand description

Parses one client text frame (INIT, PUB, SUB, UNSUB).

Leading and internal space/tab runs are skipped between fields. PUB payload is not parsed as JSON here.

ยงErrors

Returns a parse error if the frame is empty, the keyword is unknown, a required field is missing, an identifier is illegal, or INIT JSON is unusable.