use std::borrow::Cow;
use std::fmt::Debug;
use thiserror::Error;
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum WkbError {
#[error("Incorrect type passed to operation: {0}")]
IncorrectType(Cow<'static, str>),
#[error("Not yet implemented: {0}")]
NotYetImplemented(String),
#[error("General error: {0}")]
General(String),
#[error(transparent)]
IOError(#[from] std::io::Error),
#[error(transparent)]
OverflowError(#[from] std::num::TryFromIntError),
}
pub type WkbResult<T> = std::result::Result<T, WkbError>;