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
use ;
/// Error Struct For Twitch Alerts
///
/// # Parameters
/// * `code` - Error Code Identifier
/// * `description` - Description of the error
///
/// # Error Codes
/// ### Reqwest Codes
/// * `1` - An error occurred due to timing out...
/// * `2` - An error occurred when trying to connect...
/// * `3` - Status returned as an Error...
/// * `4` - An error occurred due to an attempted redirect...
/// * `5` - An error occurred due to the request...
/// * `6` - An error occurred with the request or response body...
/// * `7` - An error occurred with the type builder...
/// * `8` - An unknown error occurred with the request
///
/// ### Tokio Codes
/// * `9` - A Tokio error occurred which resulted in a check being cancelled...
/// * `10` - An error occurred causing the Tokio task to panic...
/// * `11` - An unknown Tokio Error Occurred...
/// # Example
/// ```
///
/// use twitchalerts::error::Error;
///
/// pub async fn main() -> Result<(), Error> {
/// let err: Error = Error::new("An error occurred due to an attempted redirect...", 4);
/// Err(err)
/// }
/// ```