You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.
Currently, this crate forces the use of many allocations.
It should be possible to make Value use Cow internally, as well as making Request store an &'a [Value] for the arguments (note that the name of the called method is already a &'a str). This makes adding single arguments impossible, but that's not really a problem since the user can just use a Vec themselves.
One thing to note is that this will probably make Value a bit clunkier to use: Cow is hard to match on. Also, I've noticed that implementing this causes a cyclic trait dependency.
The text was updated successfully, but these errors were encountered:
The 0copy branch tries to implement this but (as noted above) causes a compiler error that I don't know how to fix. The cause is probably rust-lang/rust#23714
Currently, this crate forces the use of many allocations.
It should be possible to make
Value
useCow
internally, as well as makingRequest
store an&'a [Value]
for the arguments (note that the name of the called method is already a&'a str
). This makes adding single arguments impossible, but that's not really a problem since the user can just use aVec
themselves.One thing to note is that this will probably make
Value
a bit clunkier to use:Cow
is hard tomatch
on. Also, I've noticed that implementing this causes a cyclic trait dependency.The text was updated successfully, but these errors were encountered: