pub enum Error {
    Parse(ParseError),
    Write(WriteError),
    Clean {
        path: PathBuf,
        err: Error,
    },
    OpenTemplateFile {
        path: PathBuf,
        err: Error,
    },
    ParseTemplate(String),
    Feed(FeedError),
    Io(Error),
}
Expand description

The error type for building a site. Errors can be during parsing, writing, cleaning output directories, parsing template files, and other I/O.

Variants

Parse(ParseError)

Returned for errors during parsing.

Write(WriteError)

Returned for errors writing crate::post::Posts to disk as HTML files.

Clean

Fields

path: PathBuf
err: Error

Returned for I/O problems while cleaning output directories.

OpenTemplateFile

Fields

path: PathBuf
err: Error

Returned for I/O problems while opening template files.

ParseTemplate(String)

Returned for errors parsing template files.

Feed(FeedError)

Returned for errors writing the feed.

Io(Error)

Returned for other I/O errors.

Trait Implementations

Formats the value using the given formatter. Read more

Implements fmt::Display for Error.

Implements std::error::Error 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 std::io::Errors into Error. This allows us to use the ? operator.

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

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

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

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.