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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
use crateErrorLog;
/**
Macro to [`push_result()`][crate::ErrorLog::push_result] and return given [`ErrorLog`][crate::ErrorLog] if given [`Result`] is an [`Err`]
Same as
#[cfg_attr(tarpaulin, ignore)]
```
# use error_log::ErrorLog;
# fn run() -> ErrorLog<i32, std::num::ParseIntError> {
let mut err_log = ErrorLog::<i32, std::num::ParseIntError>::new();
match "a1".parse::<i32>() {
Ok(o) => err_log.set_ok(o),
Err(e) => {
err_log.push_err(e);
return err_log;
}
};
# err_log
# }
*/
/**
Macro to [`merge_result()`][crate::ErrorLog::merge_result] and return given [`ErrorLog`][crate::ErrorLog] if given [`Result`] is an [`Err`]
Same as
```
# use error_log::ErrorLog;
# fn run() -> ErrorLog<i32, std::num::ParseIntError> {
let mut err_log = ErrorLog::<i32, std::num::ParseIntError>::new();
match "a1".parse::<i32>() {
Ok(o) => err_log.set_ok(o),
Err(e) => {
err_log.push_err(e);
return err_log;
}
};
# err_log
# }
```
Arguments:
1. [`Result`]
2. [`ErrorLog`]
*/
/**
Attach error to given [`ErrorLog`][crate::ErrorLog] and return it.
Arguments:
1. err value
2. [`ErrorLog`]
*/
/**
Set `ok` value of given [`ErrorLog`][crate::ErrorLog] and return it
Arguments:
1. err value
2. [`ErrorLog`]
*/