@biosbob, have you checked out this thread: Implementing Generic Concepts on Function Declarations
I don’t ascribe to the techniques there in my own code for Zig anymore, but there was a lot of great thinking and you might have some more insight into building a better mousetrap.