fcb_core/packed_rtree/error.rs
1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum Error {
5 #[error("io error: {0}")]
6 Io(#[from] std::io::Error),
7
8 #[cfg(feature = "http")]
9 #[error("http error: {0}")]
10 Http(#[from] http_range_client::HttpError),
11
12 #[error("rtree error: {0}")]
13 RTreeError(String),
14}
15
16impl From<&str> for Error {
17 fn from(s: &str) -> Self {
18 Error::RTreeError(s.to_string())
19 }
20}