Struct fs_extra::error::Error
[−]
[src]
pub struct Error { pub kind: ErrorKind, // some fields omitted }
The error type for fs_extra operations with files and folder.
Errors mostly originate from the underlying OS, but custom instances of
Error
can be created with crafted error messages and a particular value of
ErrorKind
.
Fields
kind: ErrorKind
Type error
Methods
impl Error
[src]
fn new(kind: ErrorKind, message: &str) -> Error
[src]
Create a new fs_extra error from a kind of error error as well as an arbitrary error payload.
Examples
⚠Be careful when using this code, it's not being tested!
extern crate fs_extra; use fs_extra::error::{Error, ErrorKind}; errors can be created from strings let custom_error = Error::new(ErrorKind::Other, "Other Error!"); // errors can also be created from other errors let custom_error2 = Error::new(ErrorKind::Interrupted, custom_error);
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<&Error>
1.0.0[src]
The lower-level cause of this error, if any. Read more
impl From<StripPrefixError> for Error
[src]
fn from(err: StripPrefixError) -> Error
[src]
Performs the conversion.