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

Type error

Methods

impl Error
[src]

[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]

[src]

Formats the value using the given formatter.

impl Display for Error
[src]

[src]

Formats the value using the given formatter. Read more

impl StdError for Error
[src]

[src]

A short description of the error. Read more

1.0.0
[src]

The lower-level cause of this error, if any. Read more

impl From<StripPrefixError> for Error
[src]

[src]

Performs the conversion.

impl From<OsString> for Error
[src]

[src]

Performs the conversion.

impl From<IoError> for Error
[src]

[src]

Performs the conversion.