Given some generic type
T, I want to inspect in some way if
Trait and if so, perform checks on
<T as Trait>::SomeAssociatedType, i.e. check the size with
I've done some looking around and while I've found good content on downcasting, none of them seem to fit my need. Most notable, most of them involve trait objects, which I don't necessarily need here.
This playground is a minimum example of what I want to do, see the
check_stuff function and the rest should be clear.
Also, note that in this example I am passing an instance of
Struct to the function as well, but in reality that should not be needed. All of the inspections that I want to do are on the associated types of
<Struct as SomeTrait>, so no need for the instance.