kumo_dmarc/types/
format.rs

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