Specify interface methods to implement

Is there a way (other than documentation) to define an interface in a way allowing to automatically check that a struct implements all required methods at compile time?

1 Like

No, not that Iā€™m aware of.

2 Likes

It is probably possible using introspection and reflection techniques, described here Dispatch, Traits and Metaprogramming Over Reflection

1 Like