mirror of
https://github.com/n08i40k/schedule-parser-rusted.git
synced 2025-12-06 17:57:47 +03:00
26 lines
721 B
Rust
26 lines
721 B
Rust
use crate::parser::worksheet::CellPos;
|
|
use derive_more::{Display, Error, From};
|
|
|
|
#[derive(Debug, Display, Error, From)]
|
|
pub enum Error {
|
|
#[from]
|
|
BadXls(calamine::XlsError),
|
|
|
|
#[display("No work sheets found.")]
|
|
NoWorkSheets,
|
|
|
|
#[display("There is no data on work sheet boundaries.")]
|
|
UnknownWorkSheetRange,
|
|
|
|
#[display("Failed to read lesson start and end of lesson at {_0}.")]
|
|
NoLessonBoundaries(CellPos),
|
|
|
|
#[display("No start and end times matching the lesson (at {_0}) was found.")]
|
|
LessonTimeNotFound(CellPos),
|
|
|
|
#[display("Unknown lesson type `{type}` at {pos}")]
|
|
UnknownLessonType { pos: CellPos, r#type: String },
|
|
}
|
|
|
|
pub type Result<T> = core::result::Result<T, Error>;
|