pub fn encode(param: &ParamType, value: &Value) -> Result<Value, EncodeError>Expand description
Marshals an argument value to its TRP wire form, directed by param.
One recursive walk over (type, value). A leaf renders bare at the top level
— the resolver coerces it via the param’s flat type — and tagged when it sits
inside an aggregate, where the resolver has no element type. Aggregates always
render to their tagged structural form. Errors if value’s shape can’t match
param.