Include serde::Deserialize for AttrValue #3483
bbonenfant
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
What prevents you from adding a dependency on |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Request
Include the
serde
feature from theimplicit-clone
crate.Details
I have a use-case where I want a parent component to use the response from the backend to create some child components and in this case I'd like to directly pass parts of the deserialized response within the child component properties. The documentation suggests that you should use
AttrValue
in place ofString
where possible, and so it follows that I'd want to deserialize the string values of the response directly intoAttrValue
, but it's not at clear how one would do that. After doing some investigation I found that theimplicit-clone
crate, whereAttrValue
is defined, does implementserde::Deserialize
trait but only exposes it when installed using theserde
feature.Since
serde
is already a dependency foryew
, it would be nice to include the ability deserialize intoAttrValue
by default. If you are open to this change I'm happy to offer to submit a PR, as well as try to update the tutorial example to deserialize directly intoAttrValue
Beta Was this translation helpful? Give feedback.
All reactions