use `enum` for the `result_type` instead of a simple `bool`