mtp_mount/error.rs
1use thiserror::Error;
2
3/// Errors returned by mtp-mount operations.
4#[derive(Debug, Error)]
5
6pub enum MountError {
7 /// An error from the underlying MTP library.
8 #[error("MTP error: {0}")]
9 Mtp(#[from] mtp_rs::Error),
10
11 /// An I/O error (filesystem, FUSE, etc.).
12 #[error("I/O error: {0}")]
13 Io(#[from] std::io::Error),
14
15 /// No MTP device was found on the system.
16 #[error("no MTP device found")]
17 #[allow(dead_code)]
18 NoDevice,
19
20 /// A catch-all for other error conditions.
21 #[error("{0}")]
22 Other(String),
23}