Skip to main content

mock_igd/
error.rs

1//! Error types for mock-igd.
2
3use thiserror::Error;
4
5/// Result type alias for mock-igd operations.
6pub type Result<T> = std::result::Result<T, Error>;
7
8/// Errors that can occur in mock-igd.
9#[derive(Debug, Error)]
10pub enum Error {
11    /// Failed to bind to address.
12    #[error("failed to bind to address: {0}")]
13    Bind(#[from] std::io::Error),
14
15    /// Invalid SOAP action.
16    #[error("invalid SOAP action: {0}")]
17    InvalidAction(String),
18
19    /// Server is not running.
20    #[error("server is not running")]
21    ServerNotRunning,
22}