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
use fmt;
/// Why a client could not be built, or a request could not be answered.
///
/// Transient failures (connection errors, HTTP 429, 5xx) are retried inside
/// [`Client::ask`](crate::Client::ask) and only surface as [`Error::Api`] once the retries are
/// spent. The other variants are returned at once, because retrying cannot help.
///
/// The enum is `#[non_exhaustive]`: a later version may tell more failures apart, so a `match`
/// needs a wildcard arm. [`Error::message`] and `Display` give the text of any variant.