[−][src]Trait body_image_futio::RequestRecorder
Extension trait for http::request::Builder
, to enable recording key
portions of the request for the final Dialog
.
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
pub fn record(self) -> Result<RequestRecord<B>, Error>
[src]
Short-hand for completing the builder with an empty body, as is the case with many HTTP request methods (e.g. GET).
pub fn record_body<BB>(self, body: BB) -> Result<RequestRecord<B>, Error> where
BB: Into<Bytes>,
[src]
BB: Into<Bytes>,
Complete the builder with any body that can be converted to a (Ram)
Bytes
buffer.
pub fn record_body_image(
self,
body: BodyImage,
tune: FutioTunables
) -> Result<RequestRecord<B>, Error>
[src]
self,
body: BodyImage,
tune: FutioTunables
) -> Result<RequestRecord<B>, Error>
Complete the builder with a BodyImage
for the request body.
Note: Both BodyImage
and FutioTunables
are Clone
(inexpensive),
so that can be done beforehand to preserve owned copies.
Implementations on Foreign Types
impl RequestRecorder<Body> for Builder
[src]
pub fn record(self) -> Result<RequestRecord<Body>, Error>
[src]
pub fn record_body<BB>(self, body: BB) -> Result<RequestRecord<Body>, Error> where
BB: Into<Bytes>,
[src]
BB: Into<Bytes>,
pub fn record_body_image(
self,
body: BodyImage,
tune: FutioTunables
) -> Result<RequestRecord<Body>, Error>
[src]
self,
body: BodyImage,
tune: FutioTunables
) -> Result<RequestRecord<Body>, Error>
impl<SW> RequestRecorder<SW> for Builder where
SW: StreamWrapper + Body + Send,
[src]
SW: StreamWrapper + Body + Send,
pub fn record(self) -> Result<RequestRecord<SW>, Error>
[src]
pub fn record_body<BB>(self, body: BB) -> Result<RequestRecord<SW>, Error> where
BB: Into<Bytes>,
[src]
BB: Into<Bytes>,
pub fn record_body_image(
self,
body: BodyImage,
tune: FutioTunables
) -> Result<RequestRecord<SW>, Error>
[src]
self,
body: BodyImage,
tune: FutioTunables
) -> Result<RequestRecord<SW>, Error>