Skip to main content

diode_base/
bundle.rs

1use diode::AppBuilder;
2
3pub trait BundleExt {
4    fn add_bundle<F>(&mut self, func: F) -> &mut Self
5    where
6        F: FnOnce(&mut Self),
7        Self: Sized;
8}
9
10impl BundleExt for AppBuilder {
11    fn add_bundle<F>(&mut self, func: F) -> &mut Self
12    where
13        F: FnOnce(&mut Self),
14        Self: Sized,
15    {
16        func(self);
17        self
18    }
19}