code_for_status

Function code_for_status 

Source
fn code_for_status(status: StatusCode) -> String
Expand description

The code for a status no ApiError variant chose. The statuses ApiError also produces keep its spelling (INTERNAL_ERROR, FILE_TOO_LARGE, OVERLOADED), so a client branching on the code sees one name per condition whichever layer answered; the rest are the status’s reason phrase in SCREAMING_SNAKE (METHOD_NOT_ALLOWED, REQUEST_TIMEOUT).