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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/// Provides a simpler constraint for the compiler to report to the developer.
///
/// Implemented for up to five arguments.
///
/// Instead of the detailed error message from the `From` trait:
///
/// ```md
/// the trait `From<(
/// std::option::Option<std::string::String>,
/// [closure@examples/envman/src/flows/app_upload_flow.rs:101:40: 101:73],
/// )>`
/// is not implemented for
/// `MappingFnImpl<
/// std::string::String,
/// [closure@examples/envman/src/flows/app_upload_flow.rs:101:40: 101:73],
/// _,
/// >`
/// ```
///
/// we get the much clearer:
///
/// ```md
/// the trait `Func<std::option::Option<std::string::String>, _>`
/// is not implemented for closure `[closure@examples/envman/src/flows/app_upload_flow.rs:101:40: 101:73]`
/// ```
impl_func_for_f!;
impl_func_for_f!;
impl_func_for_f!;
impl_func_for_f!;
impl_func_for_f!;
/// Provides a simpler constraint for the compiler to report to the developer.
///
/// Instead of the detailed error message from the `From` trait:
///
/// ```md
/// the trait `From<(
/// std::option::Option<std::string::String>,
/// [closure@examples/envman/src/flows/app_upload_flow.rs:101:40: 101:73],
/// )>`
/// is not implemented for
/// `MappingFnImpl<
/// std::string::String,
/// [closure@examples/envman/src/flows/app_upload_flow.rs:101:40: 101:73],
/// _,
/// >`
/// ```
///
/// we get:
///
/// ```md
/// the trait `FromFunc<[closure@examples/envman/src/flows/app_upload_flow.rs:101:40: 101:73]>`
/// is not implemented for `MappingFnImpl<
/// std::string::String,
/// [closure@examples/envman/src/flows/app_upload_flow.rs:101:40: 101:73],
/// _,
/// >`
/// ```