A better Module interaction pattern?

Behaviours are well documented, so it would be easiest to check it out. For example here is a quote I was referring to:

If a module adopting a given behaviour doesn’t implement one of the callbacks required by that behaviour, a compile-time warning will be generated.

Source: Behaviours | Typespec reference @ Elixir’s documentation