1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/// Returns the size of `T`.
///
/// ```
/// use attr_of::size_of;
/// assert_eq!(size_of(&1i64), 8);
/// assert_eq!(size_of(&()), 0);
/// ```
pub const
/// Returns the name of `T`.
///
/// ```
/// use attr_of::type_of;
/// assert_eq!(type_of(&String::new()), "alloc::string::String");
/// assert_eq!(type_of(&1), "i32");
/// ```