pub fn json_body_or_else<T>(
body: Result<Json<T>, JsonRejection>,
allow_missing: bool,
default: impl FnOnce() -> T,
) -> JsonBodyOutcome<T>where
T: DeserializeOwned,Expand description
Parse body, or call default when the client omitted the JSON content
type and allow_missing is set. Any other rejection short-circuits with
a rendered error response.