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 important getter methods are found in trait
implementations RequestRecorded and
Recorded.
It may be constructed via the Prolog and Epilog public structs and the
explode method can be 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 set_res_decoded(&mut self, decoded: Vec<Encoding>)
pub fn set_res_decoded(&mut self, decoded: Vec<Encoding>)
Set a new response decoded list.
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.