Modules

Macros

This is to minimize the amount of matches made in the code Give it a Result<Whatever_you_want_to_return, Error> and the type of the success and it’ll Basically unwrap the result if its there and if it isn’t it’ll return a handled error inside a TypedHttpResponse. Default status code is InternalServerError, if you want something different pass it as the first argument as a u16. If you want to also return the success result, then pass a valid status code u16 as a second argument Sorry for defining the error status code first, it’s to maintain uniform order.
Takes whatever error you supply to it and wraps it in a GenericError if err