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
41
42
43
44
45
46
47
//! Generic utility macros that don't belong to an obvious module.
use macro_pub;
/// Simple utility macro that defines and instantiates a structure at one
/// moment. Creating the structure is a combbination of definition and
/// initialization syntax.
///
/// There are a few things to note:
///
/// - Do not use the `struct` keyword in front of the name.
/// - Visibility of the structure is always private; do not use `pub` or
/// `pub(...)` in front of the name.
/// - The name of the structure serves no purpose other than as input to
/// meta-attributes such as derives or attribute macros. For example, an
/// implimentation of [`std::fmt::Debug`].
/// - Because this declares *and* instantiates, the fields follow the same
/// syntax as a variable declaration. The types of the fields cannot be
/// elided.
/// - Field names can pe prefixed with a visibility qualifier, same as a
/// structure definition.
/// - If lifetimes are used in field types, they must be included in angle
/// brackets after the structure name, same as a declaration.
) =>