Open iqualfragile opened 8 years ago
Hm, I'm not really convinced it is worth the 3rd party dependencies. However, I could imagine this to be an optional feature.
lmdb-rs
deal with the fact that serialization/deserialization can fail for some reason? Even today the FromMdbValue
implementation for String
(uses .unwrap()
) and &str
(might produce an invalid utf8 string
) is problematic.the reason im asking you to implement this over just doing it myself is because i literally can not do that. Rust disallows me to, because both Traits are from foreign crates. Yes, as an optional, compile-time-enabled feature would be the right way to go, especially as currently both serde and rustc-serialize exist and support for both might be positive.
It would be nice to be able to insert and retrieve values more easily, therefore i propose to include a (extremly trivial) blanket implementation for ToMdbValue and/or FromMdbValue for everything that implements the serde Serialize and/or Deserialize trait using for examble bincode for serialisation.