Closed autozimu closed 7 years ago
Don't understand why serde support make conversion much easier? Currently i use Value::as_*
functions, and trait From
.
Thanks
WIth with-serde
turned on, one can have
#[Deserialize, Serialize]
struct MyStruct {
foo: String,
bar: i64,
}
let v = Value;
let s: MyStruct = rmpv::ext::deserialize_from(v).unwrap();
From this point, one can just use s
instead of matching and casting.
Looks cool, thanks 👍
Which makes conversion from/to other types much easier
Also update rmpv to latest release.