[][src]Struct body_image::Dialog

pub struct Dialog { /* fields omitted */ }

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.

Methods

impl Dialog[src]

pub fn new(pro: Prolog, epi: Epilog) -> Dialog[src]

Construct from a Prolog and Epilog.

pub fn method(&self) -> &Method[src]

The HTTP method (verb), e.g. GET, POST, etc.

pub fn url(&self) -> &Uri[src]

The complete URL as used in the request.

pub fn req_body_mut(&mut self) -> &mut BodyImage[src]

A mutable reference to the request body. This is primarly provided to allow state mutating operations such as BodyImage::mem_map.

pub fn res_status(&self) -> StatusCode[src]

The response status code.

pub fn res_version(&self) -> Version[src]

The response HTTP version.

pub fn res_decoded(&self) -> &Vec<Encoding>[src]

A list of encodings that were removed (decoded) to provide this representation of the response body (res_body). May be empty.

pub fn set_res_decoded(&mut self, decoded: Vec<Encoding>)[src]

Set a new response decoded list.

pub fn res_body_mut(&mut self) -> &mut BodyImage[src]

A mutable reference to the response body. This is primarly provided to allow state mutating operations such as BodyImage::mem_map.

pub fn set_res_body_decoded(&mut self, body: BodyImage, decoded: Vec<Encoding>)[src]

Set a new response body and decoded vector.

pub fn explode(self) -> (Prolog, Epilog)[src]

Consume self, exploding into a (Prolog, Epilog) tuple (each with public fields).

Trait Implementations

impl RequestRecorded for Dialog[src]

impl Recorded for Dialog[src]

impl Clone for Dialog[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Dialog[src]

Auto Trait Implementations

impl Send for Dialog

impl !Sync for Dialog

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]