openssh_mux_client_error/
lib.rsuse std::io;
use thiserror::Error as ThisError;
pub use ssh_format_error::Error as SshFormatError;
#[derive(Debug, ThisError)]
#[non_exhaustive]
pub enum Error {
#[error("Server speaks multiplex protocol other than protocol 4.")]
UnsupportedMuxProtocol,
#[error("Server response with unexpected package type: expected {0}, actual response {1:#?}.")]
InvalidServerResponse(&'static &'static str, Box<str>),
#[error("Server response with port = 0.")]
InvalidPort,
#[error("Server response with pid = 0.")]
InvalidPid,
#[error("Server response with a different id than the requested one.")]
UnmatchedRequestId,
#[error("Server response with a different session_id.")]
UnmatchedSessionId,
#[error("IO Error (Excluding `EWOULDBLOCK`): {0}.")]
IOError(#[from] io::Error),
#[error("Failed to serialize/deserialize the message: {0}.")]
FormatError(#[from] SshFormatError),
#[error("Server refused the request: {0}.")]
RequestFailure(Box<str>),
#[error("Server refused the request due to insufficient permission: {0}.")]
PermissionDenied(Box<str>),
}