4 releases (2 breaking)
| 0.3.1 | Sep 19, 2021 |
|---|---|
| 0.3.0 | Sep 19, 2021 |
| 0.2.0 | Sep 17, 2021 |
| 0.1.0 | Sep 16, 2021 |
#2671 in Encoding
32KB
930 lines
Soni's Serde Utilities.
This crate provides some utilities for use with serde.
Soni's Serde Utilities
This crate provides some utilities for use with serde.
Currently, it provides MayBe<T>, a deserializable that doesn't error if
something doesn't match a T. For example, it enables the JSON:
{
"bar": []
}
to successfully deserialize into the Rust struct:
#[derive(Deserialize)]
struct Foo {
bar: MayBe<f64>,
}
as a foo.bar.is_not().
Dependencies
~0.3–1MB
~21K SLoC