1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use crate::smtp::SmtpPath;
#[derive(Debug, Clone)]
pub struct Recipient {
    pub address: SmtpPath,
    pub certificate: Option<Certificate>,
}

#[derive(Debug, Clone)]
pub enum Certificate {
    File(String),
    Bytes(Vec<u8>),
}

impl Recipient {
    pub fn null() -> Self {
        Self::new(SmtpPath::Null)
    }
    pub fn new(address: SmtpPath) -> Self {
        Recipient {
            address,
            certificate: None,
        }
    }
}