Skip to main content

parse_params

Function parse_params 

Source
pub fn parse_params<P: DeserializeOwned>(
    params: &Value,
) -> Result<P, ActionError>
Expand description

Deserialize the per-step parameter blob into a typed handler-specific struct.

Wraps serde_json::from_value and converts the error into ActionError::Failed with a consistent “invalid params: …” wording.

§Errors

Returns ActionError::Failed if params cannot be deserialized into P.