This commit is contained in:
mdecimus
2024-08-01 17:09:39 +02:00
parent ed214fd087
commit 3cb8918d2e
34 changed files with 500 additions and 388 deletions

View File

@@ -130,6 +130,13 @@ impl Config {
})
}
pub fn prefix<'x, 'y: 'x>(&'y self, prefix: impl AsKey) -> impl Iterator<Item = &str> + 'x {
let prefix = prefix.as_prefix();
self.keys
.keys()
.filter_map(move |key| key.strip_prefix(&prefix))
}
pub fn set_values<'x, 'y: 'x>(&'y self, prefix: impl AsKey) -> impl Iterator<Item = &str> + 'x {
let prefix = prefix.as_prefix();