ssh_packet/
error.rs

1use thiserror::Error;
2
3/// The error types that can occur when manipulating this crate.
4#[non_exhaustive]
5#[derive(Debug, Error)]
6pub enum Error {
7    /// An error occured while performing I/O operations.
8    #[error(transparent)]
9    Io(#[from] std::io::Error),
10
11    /// The parsed identifier was not conformant.
12    #[error("The SSH identifier was either misformatted or misprefixed")]
13    BadIdentifer(String),
14
15    /// An EOF occured while parsing.
16    #[error("Unexpected EOF while waiting for SSH identifer")]
17    UnexpectedEof,
18}