armature_security/
dns_prefetch_control.rs1#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7pub enum DnsPrefetchControl {
8 Off,
10 On,
12}
13
14impl DnsPrefetchControl {
15 pub fn to_header_value(&self) -> String {
16 match self {
17 Self::Off => "off".to_string(),
18 Self::On => "on".to_string(),
19 }
20 }
21}
22
23#[cfg(test)]
24mod tests {
25 use super::*;
26
27 #[test]
28 fn test_dns_prefetch_control() {
29 assert_eq!(DnsPrefetchControl::Off.to_header_value(), "off");
30 assert_eq!(DnsPrefetchControl::On.to_header_value(), "on");
31 }
32}