settings_registration.rs

 1use gpui::App;
 2pub use inventory;
 3
 4pub struct RegisterSettingFn(fn(&mut App));
 5
 6inventory::collect!(RegisterSettingFn);
 7
 8pub fn load_registered_settings(cx: &mut App) {
 9    for register_function in inventory::iter::<RegisterSettingFn> {
10        (register_function.0)(cx);
11    }
12}