Add error module, result module
This commit is contained in:
parent
8fd52d0ef1
commit
96a22a0d47
3 changed files with 18 additions and 0 deletions
10
libimagentryedit/src/error.rs
Normal file
10
libimagentryedit/src/error.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
generate_error_module!(
|
||||
generate_error_types!(EditError, EditErrorKind,
|
||||
IOError => "IO Error"
|
||||
);
|
||||
);
|
||||
|
||||
pub use self::error::EditError;
|
||||
pub use self::error::EditErrorKind;
|
||||
pub use self::error::MapErrInto;
|
||||
|
|
@ -4,3 +4,5 @@ extern crate libimagrt;
|
|||
extern crate tempfile;
|
||||
|
||||
pub mod edit;
|
||||
pub mod error;
|
||||
pub mod result;
|
||||
|
|
6
libimagentryedit/src/result.rs
Normal file
6
libimagentryedit/src/result.rs
Normal file
|
@ -0,0 +1,6 @@
|
|||
use std::result::Result as RResult;
|
||||
|
||||
use error::EditError;
|
||||
|
||||
pub type Result<T> = RResult<T, EditError>;
|
||||
|
Loading…
Reference in a new issue