Skip to main content

parse_payload

Function parse_payload 

Source
pub fn parse_payload<T>(payload: Value) -> Result<T, SocketError>
Expand description

Deserialize + validate an event payload, reporting a bad one the way the client can act on.

Shared by every generated handler so one place decides what “invalid” means.