Skip to main content

reply_with_status

Function reply_with_status 

Source
pub fn reply_with_status(
    status: Status,
    reply: impl Reply,
) -> Result<Response<Bytes>, Rejection>
Expand description

Wraps reply with the given HTTP status code and returns it as a result.

Pairs with the [reply!] macro form reply!(message => ..., status => ...).