#[cfg(feature = "http")]
use http_range_client::HttpError;
use std::io;
use thiserror::Error;
#[derive(Error, Debug)] pub enum Error {
#[error("io error: {0}")]
IoError(#[from] io::Error),
#[error("invalid format: {0}")]
InvalidFormat(String),
#[error("key serialization error: {0}")]
KeySerializationError(String),
#[error("key deserialization error: {0}")]
KeyDeserializationError(String),
#[error("build error: {0}")]
BuildError(String),
#[error("query error: {0}")]
QueryError(String),
#[error("not implemented: {0}")]
NotImplemented(String),
#[error("other error: {0}")]
Other(String),
#[cfg(feature = "http")]
#[error("http error: {0}")]
HttpError(#[from] HttpError),
#[error("payload offset not in cache")]
PayloadOffsetNotInCache,
}
pub type Result<T> = std::result::Result<T, Error>;