From 304a29397bc8eef9b2c26bb11a889184f3c226bd Mon Sep 17 00:00:00 2001 From: hodasemi Date: Mon, 26 Aug 2024 11:46:43 +0200 Subject: [PATCH] List states --- src/states.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/states.rs b/src/states.rs index 2556827..3fdffae 100644 --- a/src/states.rs +++ b/src/states.rs @@ -238,6 +238,11 @@ impl States { self } + /// lists available states + pub fn states(&self) -> impl Iterator { + self.states.keys().map(|s| s.as_str()) + } + /// Adds a single state pub fn add_state<'a>( &mut self,