pub enum Error {
    FrontmatterMissingStartFence,
    FrontmatterMissingEndFence,
    DeserializeYaml(Error),
    Io(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.

Io(Error)

Returned for other I/O errors.

Trait Implementations

Formats the value using the given formatter. Read more

Displays an Error as human-readable text.

Implements the std::error::Error trait for Error.

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Converts ParseErrors into Error. This allows us to use the ? operator.

Converts a serde_yaml::Error into an Error. It allows us to use the ? operator for serde_yaml deserialization functions.

Converts a std::io::Error into an Error. It allows us to

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.