pub(crate) fn envelope(id: &Value, result: Value) -> ValueExpand description
Wrap a result body in its JSON-RPC envelope.
An error body is hoisted to the top-level error member; anything else
becomes result. A response carries one or the other, never both.