more event parsers

This commit is contained in:
Robin Appelman 2021-08-24 23:01:07 +02:00
commit 58100e5f7b
8 changed files with 418 additions and 17 deletions

View file

@ -14,6 +14,7 @@ use thiserror::Error;
pub enum Team {
Red,
Blue,
Spectator,
}
impl Team {
@ -21,6 +22,7 @@ impl Team {
match self {
Team::Red => "Red",
Team::Blue => "Blue",
Team::Spectator => "Spectator",
}
}
}
@ -38,6 +40,7 @@ impl FromStr for Team {
match s {
"Blue" => Ok(Team::Blue),
"Red" => Ok(Team::Red),
"Spectator" => Ok(Team::Spectator),
_ => Err(()),
}
}