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

#50 in #deriving

Download history 1768/week @ 2024-02-03 2324/week @ 2024-02-10 1133/week @ 2024-02-17 850/week @ 2024-02-24 1808/week @ 2024-03-02 2002/week @ 2024-03-09 1738/week @ 2024-03-16 1428/week @ 2024-03-23 2031/week @ 2024-03-30 1761/week @ 2024-04-06 1849/week @ 2024-04-13 2823/week @ 2024-04-20 1584/week @ 2024-04-27 1431/week @ 2024-05-04 1849/week @ 2024-05-11 1774/week @ 2024-05-18

6,851 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
~36K SLoC