pub trait ConfigName {
fn with_config_name<R>(self, operation: impl FnOnce(&str) -> R) -> R;
}
impl ConfigName for &str {
#[inline]
fn with_config_name<R>(self, operation: impl FnOnce(&str) -> R) -> R {
operation(self)
}
}
impl ConfigName for String {
#[inline]
fn with_config_name<R>(self, operation: impl FnOnce(&str) -> R) -> R {
operation(self.as_str())
}
}
impl ConfigName for &String {
#[inline]
fn with_config_name<R>(self, operation: impl FnOnce(&str) -> R) -> R {
operation(self.as_str())
}
}