I'd like to create a generic type which implements a COM interface, but if class! supports that then I can't seem to figure out the syntax. Seems like this would be the way to do it, but it gives me a syntax error at the < saying that a : is expected.
com::class! {
class MyHandler<F: Fn()> : IMyHandler
{
func: F,
}
// ... impl that calls func ...
}
I tried putting the <F: Fn()> in various other places as well, which all seemed less likely to be correct, and unsurprisingly none of them worked either. I'm figuring that class! probably just doesn't currently support this, but I'm hoping to confirm that I'm not just missing something.
I'd like to create a generic type which implements a COM interface, but if
class!supports that then I can't seem to figure out the syntax. Seems like this would be the way to do it, but it gives me a syntax error at the<saying that a:is expected.I tried putting the
<F: Fn()>in various other places as well, which all seemed less likely to be correct, and unsurprisingly none of them worked either. I'm figuring thatclass!probably just doesn't currently support this, but I'm hoping to confirm that I'm not just missing something.