1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use serde_yaml; use thiserror::Error as E; /// A specialized [`Result`] type for markdown operations. /// /// [`Result`]: https://doc.rust-lang.org/std/result/enum.Result.html pub type Result<T> = std::result::Result<T, Error>; /// An enum contains all errors that might occur. #[derive(Debug, E)] pub enum Error { /// Error when parsing the frontmatter YAML. #[error("(de)serializing error: {0}")] FrontMatterError(#[from] serde_yaml::Error), }