how do you know the members exist?
This only works with aggregates. For the sake of the argument let's assume constructors are functions (they aren't really, they're somewhat special - let's ignore that so terminology still works). Essentially you want to find the arity of that constructor, so what you do is you define a type that's convertible to anything and see how many of them you can pass the constructor before it fails. Once you know the arity you can use a structured binding to decompose