pub struct HttpRedactionWriter<'session> { /* private fields */ }Expand description
Feature-gated HTTP operations sharing one mutable diagnostic session.
Implementations§
Source§impl<'session> HttpRedactionWriter<'session>
impl<'session> HttpRedactionWriter<'session>
Source§impl<'session> HttpRedactionWriter<'session>
impl<'session> HttpRedactionWriter<'session>
Sourcepub fn body(
&mut self,
capture: BodyCapture<'_>,
content_type: Option<&HeaderValue>,
) -> &mut Self
pub fn body( &mut self, capture: BodyCapture<'_>, content_type: Option<&HeaderValue>, ) -> &mut Self
Redacts a captured HTTP body into the parent session’s aggregate output.
Body and content-type byte lengths are offered to the shared budget before the body renderer inspects their contents. Rejected input emits a non-empty diagnostic fallback when it fits; exhausted output returns empty text and does not invoke the renderer. Successful admission commits only the bounded output and closes the session when the body or session budget omits content.
§Parameters
capture- Captured body bytes and optional source-length metadata.content_type- Parsed header value used to select body handling.
§Returns
A bounded body result with completion and capture metadata.
Sourcepub fn body_with_content_type_text(
&mut self,
capture: BodyCapture<'_>,
content_type: Option<&str>,
) -> &mut Self
pub fn body_with_content_type_text( &mut self, capture: BodyCapture<'_>, content_type: Option<&str>, ) -> &mut Self
Redacts a captured HTTP body with text Content-Type.
Body and content-type byte lengths are offered to the shared budget before the body renderer inspects their contents. Rejected input emits a non-empty diagnostic fallback when it fits; exhausted output returns empty text and does not invoke the renderer. Successful admission commits only the bounded output and closes the session when the body or session budget omits content.
§Parameters
capture- Captured body bytes and optional source-length metadata.content_type- Text media type used to select body handling.
§Returns
A bounded body result with completion and capture metadata.