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
//! Parse or generate idents.
use format_ident;
use Ident;
use Uuid;
/// Declare a series of vars named by `operation` that contain an ident created
/// by concatenating the stringified `operation`, and the passed in `ident`.
/// # Examples
/// ```ignore
/// # use quote::format_ident;
/// let foo = format_ident!("{}", "foo");
/// identify!(foo, [get, and]);
/// // Expands to:
/// let get = format_ident!("{}_{}", stringify!(get), to_snake_case(&foo.to_string()));
/// let and = format_ident!("{}_{}", stringify!(and), to_snake_case(&foo.to_string()));
/// // Which results in:
/// assert_eq!(get.to_string(), "get_foo");
/// assert_eq!(and.to_string(), "and_foo");
/// ```
;
}
/// Generate the given number of unique and random idents and collect them into a vec.
/// Generate a valid, unique and random ident.