[−][src]Trait body_image_futio::RequestRecorder
Extension trait for http::request::Builder
, to enable recording key
portions of the request for the final Dialog
.
Other request fields (method
, uri
, headers
) are recorded by clone
,
after finishing the request.
The request body is cloned in advance of finishing the request, though
this is inexpensive via Bytes::clone
or BodyImage::clone
. Other
request fields (method
, uri
, headers
) are recorded by clone
, after
finishing the request.
Required methods
fn record(&mut self) -> Result<RequestRecord<B>, Error>
Short-hand for completing the builder with an empty body, as is the case with many HTTP request methods (e.g. GET).
fn record_body<BB>(&mut self, body: BB) -> Result<RequestRecord<B>, Error> where
BB: Into<Bytes>,
BB: Into<Bytes>,
Complete the builder with any body that can be converted to a (Ram)
Bytes
buffer.
fn record_body_image(
&mut self,
body: BodyImage,
tune: &Tunables
) -> Result<RequestRecord<B>, Error>
&mut self,
body: BodyImage,
tune: &Tunables
) -> Result<RequestRecord<B>, Error>
Complete the builder with a BodyImage
for the request body.
Implementations on Foreign Types
impl RequestRecorder<AsyncBodyImage> for Builder
[src]
fn record(&mut self) -> Result<RequestRecord<AsyncBodyImage>, Error>
[src]
fn record_body<BB>(
&mut self,
body: BB
) -> Result<RequestRecord<AsyncBodyImage>, Error> where
BB: Into<Bytes>,
[src]
&mut self,
body: BB
) -> Result<RequestRecord<AsyncBodyImage>, Error> where
BB: Into<Bytes>,
fn record_body_image(
&mut self,
body: BodyImage,
tune: &Tunables
) -> Result<RequestRecord<AsyncBodyImage>, Error>
[src]
&mut self,
body: BodyImage,
tune: &Tunables
) -> Result<RequestRecord<AsyncBodyImage>, Error>
impl RequestRecorder<UniBodyImage> for Builder
[src]
fn record(&mut self) -> Result<RequestRecord<UniBodyImage>, Error>
[src]
fn record_body<BB>(
&mut self,
body: BB
) -> Result<RequestRecord<UniBodyImage>, Error> where
BB: Into<Bytes>,
[src]
&mut self,
body: BB
) -> Result<RequestRecord<UniBodyImage>, Error> where
BB: Into<Bytes>,
fn record_body_image(
&mut self,
body: BodyImage,
tune: &Tunables
) -> Result<RequestRecord<UniBodyImage>, Error>
[src]
&mut self,
body: BodyImage,
tune: &Tunables
) -> Result<RequestRecord<UniBodyImage>, Error>
impl RequestRecorder<Body> for Builder
[src]
fn record(&mut self) -> Result<RequestRecord<Body>, Error>
[src]
fn record_body<BB>(&mut self, body: BB) -> Result<RequestRecord<Body>, Error> where
BB: Into<Bytes>,
[src]
BB: Into<Bytes>,
fn record_body_image(
&mut self,
body: BodyImage,
tune: &Tunables
) -> Result<RequestRecord<Body>, Error>
[src]
&mut self,
body: BodyImage,
tune: &Tunables
) -> Result<RequestRecord<Body>, Error>