pub trait HttpRequestParts {
// Required methods
fn value(
&self,
source: InputSource,
name: &str,
index: usize,
) -> Option<Cow<'_, str>>;
fn body(&self) -> &[u8] ⓘ;
// Provided methods
fn take_body_stream(&self) -> Option<StreamingBody> { ... }
fn extension(&self, _type_id: TypeId) -> Option<&dyn Any> { ... }
}Expand description
Borrowed HTTP request values used by the compiled executor.
Production adapters implement this view over their native request without copying headers, query strings, or request bodies.
Required Methods§
fn value( &self, source: InputSource, name: &str, index: usize, ) -> Option<Cow<'_, str>>
fn body(&self) -> &[u8] ⓘ
Provided Methods§
Sourcefn take_body_stream(&self) -> Option<StreamingBody>
fn take_body_stream(&self) -> Option<StreamingBody>
Transfers an adapter-owned pull request body to a streaming extractor.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".