docs.rs failed to build serde-bool-0.1.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
serde-bool-0.1.4
serde-bool
Single value, true or false, boolean deserializers.
Examples
Supporting serde untagged enums where only one boolean value is valid, allowing fallthrough to the next variant. Avoids need to wrap all fields in Option<_> just in case feature is disabled.
// disabled variant is matched
let config = .unwrap;
assert!;
// if the type used `enabled: bool`, this would cause issues and require Option<_> wrappers plus
// further validation... instead an error is returned immediately regarding the missing fields
let config = .unwrap_err;
// using a `#[serde(default)]` annotation makes `enabled = true` optional here
let config = .unwrap;
assert!;
// extra keys can exists in the disabled case, but as usual will not be captured
let config = .unwrap;
assert!;