SendEventError(ref err as &Debug) |
SerialisationError(ref err as &Debug) => err.fmt(f),
i.e. I have an enum wrapping multiple types, each implementing Debug, and I'd like an easy way of matching and printing a bunch of them like this. (I can't derive(Debug) either because I want to customise some entries.)
These are just a couple of the enum entries from this list. I think there's seven of them just wrap another error type which implements Debug. routing::error
Ah sorry, the as &Debug threw me for a bit - I see what you're saying now. Do all variants have something to Debug display? Maybe you can implement Debug for the whole enum manually, and do the customization there?