10 releases

0.2.2 Feb 5, 2020
0.2.1 Feb 12, 2019
0.2.0 Jan 30, 2019
0.1.6 Oct 17, 2018
0.1.3 Mar 15, 2017

#51 in #deriving

Download history 1853/week @ 2024-03-13 1305/week @ 2024-03-20 1354/week @ 2024-03-27 2484/week @ 2024-04-03 1718/week @ 2024-04-10 2822/week @ 2024-04-17 1542/week @ 2024-04-24 1782/week @ 2024-05-01 1384/week @ 2024-05-08 1919/week @ 2024-05-15 1977/week @ 2024-05-22 2078/week @ 2024-05-29 1534/week @ 2024-06-05 1856/week @ 2024-06-12 1065/week @ 2024-06-19 910/week @ 2024-06-26

5,729 downloads per month
Used in 2 crates

MIT/Apache

5KB
74 lines

named_type

crates.io docs.rs CircleCI

This is a small Rust procedural macro that lets you get the name of a type, whether it is an enum or a struct. By simply deriving the trait on your type, you can automatically add a function to return the name of the type.

WARNING: This package is deprecated, because Rust now provides this by default via std::any::typename.


lib.rs:

This crate provides support for deriving the NamedType trait from the named_type crate. See that crate for further documentation.

Dependencies

~1.5MB
~34K SLoC