pub enum Error {
FrontmatterMissingStartFence,
FrontmatterMissingEndFence,
DeserializeYaml(Error),
UrlParse(ParseError),
Io(Error),
Annotated(String, Box<Error>),
}
Expand description
Represents an error parsing a Post
object.
Variants§
FrontmatterMissingStartFence
Returned when a post source file is missing its starting frontmatter
fence (---
).
FrontmatterMissingEndFence
Returned when a post source file is missing its terminal frontmatter
fence (---
i.e., the starting fence was found but the ending one was
missing).
DeserializeYaml(Error)
Returned when there was an error parsing the frontmatter as YAML.
UrlParse(ParseError)
Returned when there is a problem parsing URLs.
Io(Error)
Returned for other I/O errors.
Annotated(String, Box<Error>)
An error with an annotation.
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Implements the std::error::Error
trait for Error
.
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<Error> for Error
impl From<Error> for Error
source§fn from(err: Error) -> Error
fn from(err: Error) -> Error
Converts a serde_yaml::Error
into an Error
. It allows us to use
the ?
operator for serde_yaml
deserialization functions.
source§impl From<Error> for Error
impl From<Error> for Error
source§fn from(err: ParseError) -> Error
fn from(err: ParseError) -> Error
Converts ParseError
s into Error
. This allows us to use the ?
operator.
source§impl From<ParseError> for Error
impl From<ParseError> for Error
source§fn from(err: ParseError) -> Error
fn from(err: ParseError) -> Error
Converts a url::ParseError
into an Error
. It allows us to use
the ?
operator for URL parsing and joining functions.