Trait PrepareBody
pub trait PrepareBody:
Sealed<(Parts,)>
+ Send
+ Sync
+ 'static {
// Required method
fn prepare_body(
&self,
parts: &Parts,
is_end_stream: bool,
size_hint: &SizeHint,
) -> Option<CollectOptions>;
}Available on crate features
http and std only.Expand description
Decide whether and how to collect a body for replay.
Implemented for functions taking request parts, the body’s end-of-stream assertion, and its size hint, and returning optional collection limits.
Required Methods§
fn prepare_body(
&self,
parts: &Parts,
is_end_stream: bool,
size_hint: &SizeHint,
) -> Option<CollectOptions>
fn prepare_body( &self, parts: &Parts, is_end_stream: bool, size_hint: &SizeHint, ) -> Option<CollectOptions>
Return collection options, or decline replay preparation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".