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: ParseError) -> Error
fn from(err: ParseError) -> Error
Converts ParseErrors into Error. This allows us to use the ?
operator.
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<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.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more