23 lines
549 B
Rust
23 lines
549 B
Rust
//! 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<T> = std::result::Result<T, SegmentationError>;
|