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

#49 in #deriving

Download history 1274/week @ 2023-11-26 1385/week @ 2023-12-03 1107/week @ 2023-12-10 818/week @ 2023-12-17 347/week @ 2023-12-24 1170/week @ 2023-12-31 1631/week @ 2024-01-07 1367/week @ 2024-01-14 1600/week @ 2024-01-21 1842/week @ 2024-01-28 1809/week @ 2024-02-04 2321/week @ 2024-02-11 1153/week @ 2024-02-18 1050/week @ 2024-02-25 1875/week @ 2024-03-03 567/week @ 2024-03-10

4,711 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