use super::inventory;
use crate::App;
#[derive(Debug)]
pub struct ItemRegistrar(pub fn(&mut App));
inventory::collect!(ItemRegistrar);
impl ItemRegistrar {
fn register(&self, app: &mut App) {
self.0(app);
}
}
impl App {
pub(crate) fn register_methods(&mut self) {
for registrar in inventory::iter::<ItemRegistrar> {
registrar.register(self);
}
}
}