default.txt 285 B

12345678910111213141516
  1. #[derive(Debug)]
  2. pub enum State {
  3. Start,
  4. Transient,
  5. Closed,
  6. }
  7. impl From<&'a str> for State {
  8. fn from(s: &'a str) -> Self {
  9. match s {
  10. "start" => State::Start,
  11. "closed" => State::Closed,
  12. _ => unreachable!(),
  13. }
  14. }
  15. }