diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-01-04 06:54:01 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-01-04 06:54:01 -0600 |
| commit | 2236d258859018a93b14504295385ad4fb0b3d9b (patch) | |
| tree | cf8f65635ffc3cdea5c2755f20859676b855e790 /src/error.rs | |
| parent | 70baa472b2bee69f205cc1aada304d597b858005 (diff) | |
Move error types to new module crate::error
Diffstat (limited to 'src/error.rs')
| -rw-r--r-- | src/error.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..f4db21a --- /dev/null +++ b/src/error.rs @@ -0,0 +1,23 @@ +use quick_error::quick_error; + +quick_error! { + #[derive(Debug)] + pub enum FuseError { + Io(err: std::io::Error) { from() } + ProtocolInit { display("fuse handshake failed (ancient kernel?)") } + Truncated { display("fuse request truncated") } + BadOpcode { display("unknown fuse operation") } + BadLength { display("bad length in fuse request") } + ShortWrite { display("fuse reply was trimmed on write()") } + } +} + +quick_error! { + #[derive(Debug)] + pub enum MountError { + Io(err: std::io::Error) { from() } + Fusermount { display("fusermount failed") } + } +} + +pub type FuseResult<T> = Result<T, FuseError>; |
