openssh-mux-client-error-0.1.0/.cargo_vcs_info.json0000644000000001650000000000100157250ustar { "git": { "sha1": "45d5bc651d5286b5311a4a430f113fc6a361daef" }, "path_in_vcs": "crates/mux-client-error" }openssh-mux-client-error-0.1.0/Cargo.toml0000644000000017200000000000100137210ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "openssh-mux-client-error" version = "0.1.0" authors = ["Jiahao XU "] description = "openssh mux client." keywords = [ "ssh", "openssh", "multiplex", "async", "network", ] categories = [ "asynchronous", "network-programming", "api-bindings", ] license = "MIT" repository = "https://github.com/openssh-rust/openssh-mux-client" [dependencies.ssh_format_error] version = "0.1" [dependencies.thiserror] version = "1.0.29" openssh-mux-client-error-0.1.0/Cargo.toml.orig000064400000000000000000000006721046102023000174070ustar 00000000000000[package] name = "openssh-mux-client-error" version = "0.1.0" edition = "2018" authors = ["Jiahao XU "] license = "MIT" description = "openssh mux client." repository = "https://github.com/openssh-rust/openssh-mux-client" keywords = ["ssh", "openssh", "multiplex", "async", "network"] categories = ["asynchronous", "network-programming", "api-bindings"] [dependencies] thiserror = "1.0.29" ssh_format_error = "0.1" openssh-mux-client-error-0.1.0/LICENSE000064400000000000000000000020521046102023000155170ustar 00000000000000MIT License Copyright (c) 2021 Jiahao XU Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. openssh-mux-client-error-0.1.0/src/lib.rs000064400000000000000000000032321046102023000164160ustar 00000000000000use std::io; use thiserror::Error as ThisError; pub use ssh_format_error::Error as SshFormatError; #[derive(Debug, ThisError)] #[non_exhaustive] pub enum Error { /// Server speaks multiplex protocol other than protocol 4. #[error("Server speaks multiplex protocol other than protocol 4.")] UnsupportedMuxProtocol, /// Server response with unexpected package type {0}: Response {1:#?}. #[error("Server response with unexpected package type: expected {0}, actual response {1:#?}.")] InvalidServerResponse(&'static &'static str, Box), /// Server response with port = 0. #[error("Server response with port = 0.")] InvalidPort, /// Server response with pid = 0. #[error("Server response with pid = 0.")] InvalidPid, /// Server response with a different id than the requested one. #[error("Server response with a different id than the requested one.")] UnmatchedRequestId, /// Server response with a different session_id. #[error("Server response with a different session_id.")] UnmatchedSessionId, /// IO Error (Excluding `EWOULDBLOCK`): {0}. #[error("IO Error (Excluding `EWOULDBLOCK`): {0}.")] IOError(#[from] io::Error), /// Failed to serialize/deserialize the message: {0}. #[error("Failed to serialize/deserialize the message: {0}.")] FormatError(#[from] SshFormatError), /// Server refused the request: {0}. #[error("Server refused the request: {0}.")] RequestFailure(Box), /// Server refused the request due to insufficient permission: {0}. #[error("Server refused the request due to insufficient permission: {0}.")] PermissionDenied(Box), }