Brex v1.0.0 Brex.Result.Formatter behaviour View Source
A behaviour specifying a format/1 callback which takes a list of results and
reduces them to whatever the formatter wants to.
When “used” the module provides format/1 definitions which handle a list of
Brex.Result structs and map them again to format/1. This defintions have
the lowest precedence and can be overridden as you see fit.
The last format/1 definition matches on anything and calls the imported
invalid_result!/1 function which raises an ArgumentError with an
informative message.
Default Formatters
Link to this section Summary
Functions
Raises an ArgumentError which informs the caller that the provided value was
not a valid Brex.Rule struct
Link to this section Functions
Raises an ArgumentError which informs the caller that the provided value was
not a valid Brex.Rule struct.