openssh_mux_client/
lib.rs

1#[cfg(not(unix))]
2compile_error!("This crate can only be used on unix");
3
4pub use non_zero_byte_slice::*;
5
6pub use error::Error;
7pub use openssh_mux_client_error as error;
8pub type Result<T, Err = Error> = std::result::Result<T, Err>;
9
10trait ErrorExt {
11    fn invalid_server_response(package_type: &'static &'static str, response: &Response) -> Self;
12}
13
14impl ErrorExt for Error {
15    fn invalid_server_response(package_type: &'static &'static str, response: &Response) -> Self {
16        Error::InvalidServerResponse(package_type, format!("{:#?}", response).into_boxed_str())
17    }
18}
19
20pub mod default_config;
21
22mod connection;
23pub use connection::*;
24
25mod constants;
26
27mod request;
28pub use request::{Session, Socket};
29
30mod response;
31pub use response::Response;
32
33mod session;
34pub use session::*;
35
36mod shutdown_mux_master;
37pub use shutdown_mux_master::shutdown_mux_master;
38
39mod utils;
40
41#[cfg(test)]
42#[macro_use]
43extern crate assert_matches;