Skip to content

Commit

Permalink
Implement TryFrom on RpcValue
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
j4r0u53k committed Jul 3, 2024
1 parent 9913791 commit 819e71b
Showing 1 changed file with 405 additions and 2 deletions.
Loading

0 comments on commit 819e71b

Please sign in to comment.