kumo_dmarc/types/
format.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::str::FromStr;

pub enum Format {
    Afrf,
}

impl FromStr for Format {
    type Err = String;

    fn from_str(value: &str) -> Result<Self, Self::Err> {
        Ok(match value {
            "afrf" => Self::Afrf,
            _ => return Err(format!("invalid format {value:?}")),
        })
    }
}