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