pub fn truncate_api_body(body: &str) -> StringExpand description
The ONE construction site for a capped api-call body: returns body
verbatim when it fits GATEWAY_CLIENT_BODY_CAP_BYTES, otherwise its
first cap bytes (on a UTF-8 char boundary) plus
GATEWAY_CLIENT_BODY_TRUNCATION_MARKER. The variant always carries
its final form — construction cannot forget the cap.