So I have something kinda like this:
struct Foo<F: Fn()> {
pub cb: F
}
impl <F: Fn()> Foo <F> {
pub fn new() -> Self {
Self {
cb: || {}
}
}
}
That doesn't work... but is there any way to do something like this without boxing / trait objects?