-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow freezing or locking of configuration from future alteration #2
Comments
Is it possible to make a compile time option to panic or return a Result? |
What if a That wouldn't work for the global config though. But maybe the global config should be removed (as mentioned in #17). |
Another thought to consider is how necessary this is. #[derive(Deserialize)]
struct AppConfig { ... }
fn main() {
// Setup config via config::merge [...]
let c: AppConfig = config::get("$");
} If something similar to the above is supported, perhaps we don't need a way to freeze the underlying config store. @SergioBenitez I added this issue because you expressed a strong desire to have a frozen configuration. What do you think? |
Closing this because deserialization is essentially freeze |
A
Config
instance should allow locking to prevent all future mutation. Sources would need to support some kind of roll-up.The text was updated successfully, but these errors were encountered: