pub fn validated<T: Clone + Send + Sync + 'static>(
req: &Request<impl Body>,
) -> Option<T>Expand description
Extract the validated value from request extensions.
Returns None when the request was not validated — the layer was not
applied, the type does not match, or the request was not JSON (non-JSON
requests are passed through without validation).