boox_note_parser/
error.rs1pub type Result<T = ()> = std::result::Result<T, Error>;
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5 #[error("Invalid container format")]
6 InvalidContainerFormat,
7 #[error("I/O error: {0}")]
8 Io(#[from] std::io::Error),
9 #[error("JSON error: {error} in JSON string: {json_string}")]
10 Json{
11 error: serde_json::Error,
12 json_string: String,
13 },
14 #[error("Zip error: {0}")]
15 Zip(#[from] zip::result::ZipError),
16 #[error("Protobuf decode error: {0}")]
17 ProtobufDecode(#[from] prost::DecodeError),
18 #[error("UUID parse error: {0}")]
19 UuidParse(#[from] uuid::Error),
20 #[error("UUID invalid UTF8: {0}")]
21 UuidInvalidUtf8(std::str::Utf8Error),
22 #[error("Invalid timestamp: {0}")]
23 InvalidTimestamp(u64),
24 #[error("Invalid timestamp format: {0}")]
25 InvalidTimestampFormat(String),
26 #[error("Stroke not found")]
27 StrokeNotFound,
28}