in reply to cleaning up an indirect

Do your users need to call foo_a and foo_b themselves? If not then you could use for your methods the same anon code interface that you expect your users to use to create their own handlers.

If they do, then you can make foo_a and foo_b themselves be wrappers around the same anon code interface.

I would recommend saying that they don't. Instead let them set, and call the default, and give them access to useful formatting constructors. If they want more constructors, they can build their own and use your code as a direct example.