use std::str::FromStr;
use serde::{Deserialize, Serialize};
#[derive(PartialEq, Eq, Hash, Serialize, Deserialize, Debug, Clone, Copy)]
pub enum Site {
A,
B,
C,
}
impl FromStr for Site {
type Err = String;
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"A" => Ok(Site::A),
"B" => Ok(Site::B),
"C" => Ok(Site::C),
_ => Err(format!("{s} is not a valid site")),
}
}
}