use serde::{Deserialize, Serialize};
use thiserror::Error;
#[derive(Debug, Clone, PartialEq, Eq, Error, Serialize, Deserialize)]
#[serde(tag = "type", rename_all = "snake_case")]
#[non_exhaustive]
pub enum CutPlanError {
#[error(
"layout on sheet `{sheet_name}` is not guillotine-compatible and cannot be cut on a single-blade machine"
)]
NonGuillotineNotCuttable {
sheet_name: String,
},
#[error("invalid cut-plan options: {0}")]
InvalidOptions(String),
}
pub type Result<T> = core::result::Result<T, CutPlanError>;