Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements TryFrom<&RpcValue> and TryFrom<RpcValue> for various basic types and their references. TryFrom<&RpcValue> would be useful e.g. for RPC requests params parsing, where `RpcMessge::param()` returns `Option<&RpcValue>`. TryFrom<RpcValue> can provide more efficient implementation for larger datatypes (Blob, List, Map, String), where the returned value is just moved out of the underlying Box without cloning. Crates using this library can further add any implementations of TryFrom<RpcValue> for their own types and get a uniform way to do all types conversions from RpcValue.
- Loading branch information