pub fn http_error_deserializer<'a, D>(
body: D,
response: &'a Response,
cfg: &'a ConfigBag,
) -> Box<dyn ShapeDeserializer + 'a>where
D: ShapeDeserializer + 'a,Expand description
Wraps a protocol’s body deserializer so a modeled error response’s transport-bound members are read from the HTTP message.
Separate from http_output_deserializer rather than a mode flag, because the two differ
in ways that must not be reachable from the wrong call site:
- An error tolerates an empty body while still populating header and status members, which a successful response must not do — the codec’s empty-body strictness is the current behavior there.
- There is no error schema to pass. Which error variant is being built is not known until
the generated variant calls
read_struct, so the body-only fast path cannot be evaluated. Taking no schema makes that structural: an error path has nothing to apply the fast path to, so it cannot bypass the composite.