Enum ferru::Error
[−]
[src]
pub enum Error { InvalidUtf8, IoError(Error), MissingFileName, MissingTemplateField, MustacheError(Error), ParserError(Error), StripPrefixError(StripPrefixError), TemplateNotFound, }
An enum of all error kinds.
Variants
InvalidUtf8
An error for when a type cannot be parsed to a string because it contains invalid UTF-8.
IoError(Error)
An IO error was encountered.
MissingFileName
An error which occurs when a path which is expected to contain a file
name as the final component instead terminates in .
, ..
, or solely
of a root of prefix.
MissingTemplateField
An error for when the template field is expected but not specified in a document header.
MustacheError(Error)
Wraps errors emitted by methods during mustache templating.
ParserError(Error)
Wraps errors emitted by methods when attempting to parse a document.
StripPrefixError(StripPrefixError)
Wraps errors emitted by the Path::strip_prefix
method.
TemplateNotFound
An error which occurs when a specified template cannot be found.
Methods
impl Error
[src]
fn missing_parent_path<P>(path: &P) -> Self where
P: AsRef<Path> + Debug,
[src]
P: AsRef<Path> + Debug,
Create an error for when the parent of a path cannot be obtained (e.g. if the path terminates in a root or prefix).
fn path_is_not_a_directory<P>(path: &P) -> Self where
P: AsRef<Path> + Debug,
[src]
P: AsRef<Path> + Debug,
Create an error for a non-directory path which was expected to be as directory.
fn path_not_found<P>(path: &P) -> Self where
P: AsRef<Path> + Debug,
[src]
P: AsRef<Path> + Debug,
Create an error for a path which unexpectedly points at a non-existing entity.
Trait Implementations
impl Debug for Error
[src]
impl Display for Error
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl StdError for Error
[src]
fn description(&self) -> &str
[src]
A short description of the error. Read more
fn cause(&self) -> Option<&StdError>
[src]
The lower-level cause of this error, if any. Read more
impl From<Error> for Error
[src]
impl From<Error> for Error
[src]
impl From<FromUtf8Error> for Error
[src]
fn from(_error: FromUtf8Error) -> Error
[src]
Performs the conversion.
impl From<Error> for Error
[src]
impl From<StripPrefixError> for Error
[src]
fn from(error: StripPrefixError) -> Error
[src]
Performs the conversion.