//! Error types for segmentation operations. use thiserror::Error; /// Errors that can occur during segmentation. #[derive(Error, Debug)] pub enum SegmentationError { /// Invalid input data. #[error("Invalid input: {0}")] InvalidInput(String), /// Clustering failed. #[error("Clustering failed: {0}")] ClusteringFailed(String), /// KDTree error. #[error("KDTree error: {0}")] KdTreeError(String), } /// Result type for segmentation operations. pub type Result = std::result::Result;