Expose list of queryable ids

This commit is contained in:
hodasemi 2024-04-04 14:48:41 +02:00
parent ce84cc52d8
commit 3ecada3b47
2 changed files with 8 additions and 0 deletions

View file

@ -166,6 +166,10 @@ impl GuiBuilder {
Ok(()) Ok(())
} }
pub fn ids(&self) -> Vec<&str> {
self.ids.keys().map(|n| n.as_str()).collect()
}
} }
// --- traits --- // --- traits ---

View file

@ -63,6 +63,10 @@ impl GuiSnippet {
Ok(Arc::new(GuiSnippet { grid, ids })) Ok(Arc::new(GuiSnippet { grid, ids }))
} }
pub fn ids(&self) -> Vec<&str> {
self.ids.keys().map(|n| n.as_str()).collect()
}
} }
macro_rules! impl_element { macro_rules! impl_element {