Struct body_image::Dialog
source · pub struct Dialog { /* private fields */ }
Expand description
An HTTP request and response recording.
This composed type has private fields but offers getters, mutable getters
and setter methods. Several import getter methods are are found in trait
implementations RequestRecorded
and
Recorded
.
It may be constructed via the Prolog
and Epilog
public structs and the
explode
method used to extract the same.
Implementations§
source§impl Dialog
impl Dialog
sourcepub fn req_body_mut(&mut self) -> &mut BodyImage
pub fn req_body_mut(&mut self) -> &mut BodyImage
A mutable reference to the request body. This is primarly provided
to allow state mutating operations such as BodyImage::mem_map
.
sourcepub fn res_status(&self) -> StatusCode
pub fn res_status(&self) -> StatusCode
The response status code.
sourcepub fn res_version(&self) -> Version
pub fn res_version(&self) -> Version
The response HTTP version.
sourcepub fn res_decoded(&self) -> &Vec<Encoding>
pub fn res_decoded(&self) -> &Vec<Encoding>
A list of encodings that were removed (decoded) to provide this
representation of the response body (res_body
). May be empty.
sourcepub fn res_body_mut(&mut self) -> &mut BodyImage
pub fn res_body_mut(&mut self) -> &mut BodyImage
A mutable reference to the response body. This is primarly provided
to allow state mutating operations such as BodyImage::mem_map
.
sourcepub fn set_res_body_decoded(&mut self, body: BodyImage, decoded: Vec<Encoding>)
pub fn set_res_body_decoded(&mut self, body: BodyImage, decoded: Vec<Encoding>)
Set a new response body and decoded vector.