-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
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
Can we remove the "deprecated" status from human_readable_serialization
in CollectionOptions
?
#1014
Comments
/// Deserialize an instance of type `T` from a slice of BSON bytes.
pub fn from_slice<'de, T>(bytes: &'de [u8]) -> Result<T>
where
T: Deserialize<'de>,
{
let mut deserializer = raw::Deserializer::new(bytes, false);
T::deserialize(&mut deserializer)
} This deserializer simply returns false for |
mongo-rust-driver/src/cursor/common.rs Line 281 in c070269
It's de-serialized in here. |
OK, I found RUST-1763.
But data is used by different programs, drivers can differ.
In my case, I want some binary fields in a deep-nested struct from other crates to be hex-encoded. It's not very easy to write a custom serialization/deserialization for that. And without a human-readable in-database format, it becomes unreadable when inspected with Furthermore, since the human-readable format is a feature of |
The |
That's exactly the feature I want, for a better debugging experience and to ease the burden of users having to encode things themselves. (These reasons might not be enough to justify it, though.)
Performance is not a major concern in my case.
Without this option, I'll have to manually implement the serialization for some structs deep in a dependence. :(
Is it possible to remove this "deprecated" status? If not, is there a plan to remove this field once the bug is fixed?
The text was updated successfully, but these errors were encountered: