pub enum SshMcpError {
Connection(String),
Authentication(String),
Timeout(u64),
InvalidParams(String),
ElevationFailed(String),
Config(String),
Io(Error),
SshKey(String),
}Expand description
Main error type for SeSSHion
Variants§
Connection(String)
SSH connection failed
Authentication(String)
Authentication failed (password, key, or su/sudo)
Timeout(u64)
Command execution timed out
InvalidParams(String)
Invalid parameters provided
ElevationFailed(String)
su/sudo elevation failed
Config(String)
Configuration error
Io(Error)
IO error
SshKey(String)
SSH key parsing error
Implementations§
Source§impl SshMcpError
impl SshMcpError
Sourcepub fn connection(msg: impl Into<String>) -> Self
pub fn connection(msg: impl Into<String>) -> Self
Create a connection error from a string
Sourcepub fn invalid_params(msg: impl Into<String>) -> Self
pub fn invalid_params(msg: impl Into<String>) -> Self
Create an invalid params error from a string
Sourcepub fn elevation_failed(msg: impl Into<String>) -> Self
pub fn elevation_failed(msg: impl Into<String>) -> Self
Create an elevation failed error from a string
Trait Implementations§
Source§impl Debug for SshMcpError
impl Debug for SshMcpError
Source§impl Display for SshMcpError
impl Display for SshMcpError
Source§impl Error for SshMcpError
impl Error for SshMcpError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for SshMcpError
impl !UnwindSafe for SshMcpError
impl Freeze for SshMcpError
impl Send for SshMcpError
impl Sync for SshMcpError
impl Unpin for SshMcpError
impl UnsafeUnpin for SshMcpError
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