32 lines
614 B
Rust
32 lines
614 B
Rust
|
|
use thiserror::Error;
|
||
|
|
|
||
|
|
/// Security-related error types.
|
||
|
|
#[derive(Debug, Error)]
|
||
|
|
pub enum SecurityError {
|
||
|
|
#[error("DKIM error: {0}")]
|
||
|
|
Dkim(String),
|
||
|
|
|
||
|
|
#[error("SPF error: {0}")]
|
||
|
|
Spf(String),
|
||
|
|
|
||
|
|
#[error("DMARC error: {0}")]
|
||
|
|
Dmarc(String),
|
||
|
|
|
||
|
|
#[error("DNS resolution error: {0}")]
|
||
|
|
Dns(String),
|
||
|
|
|
||
|
|
#[error("key error: {0}")]
|
||
|
|
Key(String),
|
||
|
|
|
||
|
|
#[error("IP reputation error: {0}")]
|
||
|
|
IpReputation(String),
|
||
|
|
|
||
|
|
#[error("parse error: {0}")]
|
||
|
|
Parse(String),
|
||
|
|
|
||
|
|
#[error("IO error: {0}")]
|
||
|
|
Io(#[from] std::io::Error),
|
||
|
|
}
|
||
|
|
|
||
|
|
pub type Result<T> = std::result::Result<T, SecurityError>;
|