We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For example:
impl<'de, E> IntoDeserializer<'de, E> for BorrowedStrDeserializer<'de, E> where E: de::Error, { type Deserializer = Self; fn into_deserializer(self) -> Self { self } }
This would be useful to #2467.
Instead of:
struct BorrowedStr<'de>(&'de str); impl<'de, E: de::Error> IntoDeserializer<'de, E> for BorrowedStr<'de> { type Deserializer = BorrowedStrDeserializer<'de, E>; fn into_deserializer(self) -> Self::Deserializer { BorrowedStrDeserializer::new(self.0) } } let deserializer = MapDeserializer::new( my_map.into_iter().map(|(k, v)| { (BorrowedStr(k), BorrowedStr(v)) }), );
you'd have:
use serde::de::value::BorrowedStrDeserializer; let deserializer = MapDeserializer::new( my_map.into_iter().map(|(k, v)| { (BorrowedStrDeserializer::new(k), BorrowedStrDeserializer::new(v)) }), );
Note that MapDeserializer requires an input of type impl Iterator<Item = (impl IntoDeserializer<'de, E>, impl IntoDeserializer<'de, E>)>.
MapDeserializer
impl Iterator<Item = (impl IntoDeserializer<'de, E>, impl IntoDeserializer<'de, E>)>
The text was updated successfully, but these errors were encountered:
IntoDeserializer
Deserializer
serde::de::value
Successfully merging a pull request may close this issue.
For example:
This would be useful to #2467.
Instead of:
you'd have:
Note that
MapDeserializer
requires an input of typeimpl Iterator<Item = (impl IntoDeserializer<'de, E>, impl IntoDeserializer<'de, E>)>
.The text was updated successfully, but these errors were encountered: