1use std::path::PathBuf;
7
8pub type Result<T> = std::result::Result<T, Error>;
10
11#[derive(Debug, thiserror::Error)]
13pub enum Error {
14 #[error("I/O error: {0}")]
16 Io(#[from] std::io::Error),
17
18 #[error("Failed to parse markdown: {0}")]
20 ParseError(String),
21
22 #[error("Configuration error: {0}")]
24 ConfigError(String),
25
26 #[error("Invalid file path: {}", .0.display())]
28 InvalidPath(PathBuf),
29
30 #[error("Pattern error: {0}")]
32 PatternError(#[from] glob::PatternError),
33
34 #[error("Glob error: {0}")]
36 GlobError(#[from] glob::GlobError),
37
38 #[error("TOML error: {0}")]
40 TomlError(#[from] toml::de::Error),
41
42 #[error("Formatting error: {0}")]
44 FormattingError(String),
45}