use anyhow::Result;
pub struct CommandRegistration {
pub register: fn() -> Result<()>,
}
inventory::collect!(CommandRegistration);
pub fn reg_all_commands() -> Result<()> {
for reg in inventory::iter::<CommandRegistration> {
(reg.register)()?;
}
Ok(())
}