serde-name

serde-name on crates.io Documentation (latest release) Documentation (master) License License

This crate provides a fast and reliable way to extract the Serde name of a Rust container.

```rust

[derive(Deserialize)]

struct Foo { bar: Bar, }

[derive(Deserialize)]

[serde(rename = "ABC")]

enum Bar { A, B, C }

asserteq!(tracename::(), Some("Foo")); asserteq!(tracename::(), Some("ABC")); asserteq!(tracename::>(), None); ```

Contributing

See the CONTRIBUTING file for how to help out.

License

This project is available under the terms of either the Apache 2.0 license or the MIT license.