Skip to main content

json_cast_params

Function json_cast_params 

Source
pub fn json_cast_params<N, M>(params: N) -> Result<M, Error>
Expand description

Cast incoming request/notification params into a typed payload.

ยงErrors

Returns Internal error (-32603) if params cannot be serialized, or Invalid params (-32602) if the JSON cannot be decoded as M. Returned diagnostics include the input JSON and may include input values in the parse reason. Treat them as sensitive; the SDK redacts errors at WARN.