typenaming 0.3.0

Infrastructure to derive name of type
Documentation
1
2
3
4
5
6
7
8
9
10
#[test]
fn simple() {
    use ::typenaming::TypeNameable;
    #[derive(TypeNameable)]
    struct B {}
    let type_name = dbg!(B::type_info());
    assert_eq!("B", type_name.type_name());
    assert_eq!(Some("typenaming"), type_name.crate_name().as_deref());
    assert_eq!(0, type_name.generics().len());
}