use thiserror::Error;
#[derive(Debug, Error)]
pub enum RegionError {
#[error("core error: {0}")]
Core(#[from] crate::core::Error),
#[error("unsupported depth: expected {expected}, got {actual}")]
UnsupportedDepth { expected: &'static str, actual: u32 },
#[error("invalid seed position: ({x}, {y})")]
InvalidSeed { x: u32, y: u32 },
#[error("invalid parameters: {0}")]
InvalidParameters(String),
#[error("segmentation error: {0}")]
SegmentationError(String),
#[error("empty image: no pixels to process")]
EmptyImage,
#[error("not yet implemented")]
NotImplemented,
}
pub type RegionResult<T> = Result<T, RegionError>;