use thiserror::Error;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, Error)]
pub enum Error {
#[error("Invalid geometry: {0}")]
InvalidGeometry(String),
#[error("Invalid boundary: {0}")]
InvalidBoundary(String),
#[error("Configuration error: {0}")]
ConfigError(String),
#[error("NFP computation failed: {0}")]
NfpError(String),
#[error("No valid placement found for geometry: {0}")]
NoPlacement(String),
#[error("Computation cancelled")]
Cancelled,
#[error("Timeout exceeded after {0}ms")]
Timeout(u64),
#[cfg(feature = "serde")]
#[error("Serialization error: {0}")]
SerializationError(String),
#[error("Internal error: {0}")]
Internal(String),
}