pub fn reply_with_json<T: Serialize>(
json: &T,
) -> Result<impl Reply + use<T>, Rejection>Expand description
Serialises json as a JSON body and returns it as a 200 OK reply result.
T must implement serde::Serialize. Equivalent to reply!(json => ...).