pub enum SftpManError {
Generic(String),
NoMountsConfigDirectory,
MountListParse(ParseError),
FilesystemMountDefinitionRead(PathBuf, Error),
FilesystemMountDefinitionRemove(PathBuf, Error),
JSON(PathBuf, Error),
MountVfsTypeMismatch {
path: PathBuf,
found_vfs_type: String,
expected_vfs_type: String,
},
MountCommandBuilding(String),
CommandExecution(Command, Error),
CommandUnsuccessful(Command, Output),
IO(PathBuf, Error),
}Variants§
Generic(String)
Happens when any other generic error occurs.
NoMountsConfigDirectory
Happens when the mounts configuration directory does not exist.
MountListParse(ParseError)
Happens when mnt::get_submounts fails to parse the mount list.
FilesystemMountDefinitionRead(PathBuf, Error)
Happens when the mount config definition cannot be read.
FilesystemMountDefinitionRemove(PathBuf, Error)
Happens when the mount config definition file cannot be removed.
JSON(PathBuf, Error)
Happens when the mount config definition cannot be parsed as JSON.
MountVfsTypeMismatch
Happens when a given mount path was found, but it was not of the expected type (e.g. fuse.sshfs).
MountCommandBuilding(String)
Happens when the mount command cannot be constructed.
CommandExecution(Command, Error)
Happens when the mount command cannot be executed.
CommandUnsuccessful(Command, Output)
Happens when the mount command was executed, but was unsuccessful.
IO(PathBuf, Error)
Happens when the mount directory could not be prepared.
Trait Implementations§
Source§impl Debug for SftpManError
impl Debug for SftpManError
Source§impl Display for SftpManError
impl Display for SftpManError
Source§impl Error for SftpManError
impl Error for SftpManError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ParseError> for SftpManError
impl From<ParseError> for SftpManError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SftpManError
impl !RefUnwindSafe for SftpManError
impl Send for SftpManError
impl Sync for SftpManError
impl Unpin for SftpManError
impl !UnwindSafe for SftpManError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP