t_ssh_client/
error.rs

1use std::io;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum ClientError {
6    #[error(transparent)]
7    IOError(#[from] io::Error),
8    #[error("connect server failed: {0}")]
9    ClientFailed(#[from] thrussh::Error),
10    #[error("connect server timeout.")]
11    Timeout,
12    #[error("auth failed: {0}")]
13    AuthFailed(String),
14    #[error("encode/decode failed: {0}")]
15    KeyError(#[from] thrussh_keys::Error),
16    #[error("login username is empty.")]
17    UsernameEmpty,
18}