default-ext 0.1.0

This library provides extension methods for the `Default` trait.
Documentation
  • Coverage
  • 33.33%
    1 out of 3 items documented1 out of 3 items with examples
  • Size
  • Source code size: 15.47 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 113.59 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • mechiru/default-ext
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mechiru

default-ext

ci Rust Documentation Latest Version

This library provides extension methods for the Default trait.

Example

case1:

use default_ext::DefaultExt;
assert!(false.is_default());

case2:

#[derive(serde::Serialize, serde::Deserialize)]
struct Object {
    #[serde(
        default,
        skip_serializing_if = "default_ext::DefaultExt::is_default",
    )]
    is_test: bool,
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.