aprs_is/
error.rs

1//! Error types for APRS-IS operations.
2
3/// Errors that can occur during APRS-IS operations.
4#[derive(Debug, thiserror::Error)]
5pub enum AprsIsError {
6    /// The TCP connection could not be established.
7    #[error("APRS-IS connect failed: {0}")]
8    Connect(std::io::Error),
9
10    /// A read from the TCP socket failed.
11    #[error("APRS-IS read failed: {0}")]
12    Read(std::io::Error),
13
14    /// A write to the TCP socket failed.
15    #[error("APRS-IS write failed: {0}")]
16    Write(std::io::Error),
17
18    /// The initial login handshake timed out.
19    #[error("APRS-IS login timed out")]
20    LoginTimeout,
21
22    /// The server rejected the login credentials.
23    #[error("APRS-IS login rejected: {0}")]
24    LoginRejected(String),
25}