Struct crowbook::Error
[−]
[src]
pub struct Error { /* fields omitted */ }
Crowbook Error type.
This type tries (when it can) to track where the error came from, to pinpoint the file (at least) and, if possible, the line the user needs to look at.
Methods
impl Error
[src]
pub fn default<S: Into<Cow<'static, str>>, O: Into<Source>>(
source: O,
msg: S
) -> Error
[src]
source: O,
msg: S
) -> Error
Creates a new default error.
pub fn grammar_check<S: Into<Cow<'static, str>>, O: Into<Source>>(
source: O,
msg: S
) -> Error
[src]
source: O,
msg: S
) -> Error
Creates a new grammar check error.
Used when there is a problem connecting to languagetool
pub fn parser<S: Into<Cow<'static, str>>, O: Into<Source>>(
source: O,
msg: S
) -> Error
[src]
source: O,
msg: S
) -> Error
Creates a new parser error.
Error when parsing markdown file.
pub fn config_parser<S: Into<Cow<'static, str>>, O: Into<Source>>(
source: O,
msg: S
) -> Error
[src]
source: O,
msg: S
) -> Error
Creates a new config parser error.
Error when parsing the book configuration file.
pub fn file_not_found<S1: Into<Cow<'static, str>>, S2: Into<Cow<'static, str>>, O: Into<Source>>(
source: O,
msg: S1,
file: S2
) -> Error
[src]
source: O,
msg: S1,
file: S2
) -> Error
Creates a new "file not found" error
Arguments
- source: the source of the error.
- msg: description of why the file was needed.
- file: file name that wasn't found.
pub fn render<S: Into<Cow<'static, str>>, O: Into<Source>>(
source: O,
msg: S
) -> Error
[src]
source: O,
msg: S
) -> Error
Creates a new render error.
Error when rendering the book to a given format.
pub fn template<S: Into<Cow<'static, str>>, O: Into<Source>>(
source: O,
msg: S
) -> Error
[src]
source: O,
msg: S
) -> Error
Creates a new template error.
Error when compiling a mustache template.
pub fn invalid_option<S: Into<Cow<'static, str>>, O: Into<Source>>(
source: O,
msg: S
) -> Error
[src]
source: O,
msg: S
) -> Error
Creates a new invalid option error.
Error when trying to set an option.
pub fn zipper<S: Into<Cow<'static, str>>>(msg: S) -> Error
[src]
Creates a new zipper error.
Error when moving/copying files to temporary dir, e.g. using zip
commmand.
pub fn book_option<S: Into<Cow<'static, str>>, O: Into<Source>>(
source: O,
msg: S
) -> Error
[src]
source: O,
msg: S
) -> Error
Creates a new book option error
Used when converting an error to invalid type.
pub fn with_source<O: Into<Source>>(self, source: O) -> Error
[src]
Change the source of an error.
pub fn is_default(&self) -> bool
[src]
Returns true if self is a default option error, false else.
pub fn is_parser(&self) -> bool
[src]
Returns true if self is a parser error, false else.
pub fn is_config_parser(&self) -> bool
[src]
Returns true if self is a config parser error, false else.
pub fn is_file_not_found(&self) -> bool
[src]
Returns true if self is a file not found error, false else.
pub fn is_render(&self) -> bool
[src]
Returns true if self is a render error, false else.
pub fn is_zipper(&self) -> bool
[src]
Returns true if self is a zipper error, false else.
pub fn is_book_option(&self) -> bool
[src]
Returns true if self is a book option error, false else.
pub fn is_invalid_option(&self) -> bool
[src]
Returns true if self is an invalid option error, false else.
Trait Implementations
impl Debug for Error
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Error
[src]
fn eq(&self, __arg_0: &Error) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Error) -> bool
[src]
This method tests for !=
.
impl Error for Error
[src]
fn description(&self) -> &str
[src]
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
1.0.0[src]
The lower-level cause of this error, if any. Read more
impl Display for Error
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl From<Error> for Error
[src]
Implement our Error from mustache::Error
impl From<Error> for Error
[src]
Implement our error from epub_maker::Error
impl From<FromUtf8Error> for Error
[src]
fn from(err: FromUtf8Error) -> Error
[src]
Performs the conversion.