[][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]

impl Debug for Dialog[src]

Auto Trait Implementations

impl Send for Dialog

impl Unpin for Dialog

impl Sync for Dialog

impl UnwindSafe for Dialog

impl RefUnwindSafe for Dialog

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,