use crate::{ProgramCollect, program::Program}; pub trait ProgramSetup where C: ProgramCollect, { fn setup(&mut self, program: &mut Program); } impl Program where C: ProgramCollect, { /// Load and execute init logic pub fn with_setup + 'static>(&mut self, mut setup: S) -> S { S::setup(&mut setup, self); setup } }