-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy patherror.rs
More file actions
75 lines (59 loc) · 1.94 KB
/
Copy patherror.rs
File metadata and controls
75 lines (59 loc) · 1.94 KB
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
use thiserror::Error;
/// Crate-specific error enum
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum Error {
/// An error from a [streaming search](crate::stream) backend, which produces its own error type.
#[error(transparent)]
Backend(#[from] Box<dyn std::error::Error + Send + Sync>),
/// Returned when unable to read a STAC value from a path.
#[error("{io}: {path}")]
FromPath {
/// The [std::io::Error]
#[source]
io: std::io::Error,
/// The path.
path: String,
},
/// [http::header::InvalidHeaderName]
#[error(transparent)]
InvalidHeaderName(#[from] http::header::InvalidHeaderName),
/// [http::header::InvalidHeaderValue]
#[error(transparent)]
InvalidHeaderValue(#[from] http::header::InvalidHeaderValue),
/// [http::method::InvalidMethod]
#[error(transparent)]
InvalidMethod(#[from] http::method::InvalidMethod),
/// [tokio::task::JoinError]
#[error(transparent)]
Join(#[from] tokio::task::JoinError),
/// [std::io::Error]
#[error(transparent)]
Io(#[from] std::io::Error),
#[cfg(feature = "store")]
#[error(transparent)]
/// [object_store::Error]
ObjectStore(#[from] object_store::Error),
#[cfg(feature = "geoparquet")]
#[error(transparent)]
/// [parquet::errors::ParquetError]
Parquet(#[from] parquet::errors::ParquetError),
#[error(transparent)]
/// [reqwest::Error]
Reqwest(#[from] reqwest::Error),
#[error(transparent)]
/// [serde_json::Error]
SerdeJson(#[from] serde_json::Error),
#[error(transparent)]
/// [stac::Error]
Stac(#[from] stac::Error),
/// [std::num::TryFromIntError]
#[error(transparent)]
TryFromInt(#[from] std::num::TryFromIntError),
/// Unsupported file format.
#[error("unsupported format: {0}")]
UnsupportedFormat(String),
/// [url::ParseError]
#[error(transparent)]
UrlParse(#[from] url::ParseError),
}