NimbleParsec - a simple and fast parser combinator for Elixir

You have to supply a user-defined function (which needs to be a real def in the module) which takes the binary and has to return a success or error.