Associated Types not supported

#[enum_dispatch(Fails)]
trait Foo {
    type Data;

    fn a(&mut self) -> Self::Data;

    fn b(&mut self, state: Self::Data);
}

struct FooImpl;
impl Foo for FooImpl {
    type Data = ();
    fn a(&mut self) -> Self::Data {
        ()
    }

    fn b(&mut self, _state: Self::Data) {}
}

#[enum_dispatch]
pub enum Fails {
    FooImpl,
}

This should be generically addressable:

Make a new enum (or require one passed in?) that wraps the associated type in each implementor, and where the type is an input, unwrap the new type to get to the underlying type. Where the type is returned, wrap it into the carrying type.

Currently fails like so:

error: custom attribute panicked
   --> foo/src/middleware.rs:183:1
    |
183 | #[enum_dispatch]
    | ^^^^^^^^^^^^^^^^
    |
    = help: message: Unsupported trait item