#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum Error {
Endpoint(String),
Bucket(String),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::Endpoint(endpoint) => {
write!(f, "endpoint {endpoint:?} is not scheme://host[:port]")
}
Error::Bucket(bucket) => write!(f, "bucket name {bucket:?} is empty"),
}
}
}
impl std::error::Error for Error {}