kumo_dmarc/types/
format.rs

1use std::str::FromStr;
2
3#[derive(Debug)]
4pub enum Format {
5    Afrf,
6}
7
8impl FromStr for Format {
9    type Err = String;
10
11    fn from_str(value: &str) -> Result<Self, Self::Err> {
12        Ok(match value {
13            "afrf" => Self::Afrf,
14            _ => return Err(format!("invalid format {value:?}")),
15        })
16    }
17}