The arguments of RPC currently have to be either serializable or JsValue. Ideally, this restriction should be relaxed to allow composite types, e.g., an arbitrary struct or enum containing a JsValue to be sent across a channel, however, at a bare minimum it should be possible to have RPC calls that can return a Result<T, JsValue> since this pattern is used to represent exceptions from Javascript code.
The arguments of RPC currently have to be either serializable or JsValue. Ideally, this restriction should be relaxed to allow composite types, e.g., an arbitrary struct or enum containing a JsValue to be sent across a channel, however, at a bare minimum it should be possible to have RPC calls that can return a
Result<T, JsValue>
since this pattern is used to represent exceptions from Javascript code.