Struct body_image::Dialog[][src]

pub struct Dialog { /* fields omitted */ }

An HTTP request and response recording.

Note that several important getter methods for Dialog are found in trait implementations RequestRecorded and Recorded.

Methods

impl Dialog
[src]

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

The complete URL as used in the request.

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

The response status code.

The response HTTP version.

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

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

Trait Implementations

impl TryFrom<Dialog> for Record
[src]

Attempt to convert Dialog to Record. This derives meta headers from various Dialog fields, and could potentially fail, based on header value constraints, with BarcError::InvalidHeader. Converting Dialog::url to the meta url header has the most potential, given http::Uri validation complexity, but any conversion failure would suggest an http crate bug or breaking change—as currently stated, allowed Uri bytes are a subset of allowed HeaderValue bytes.

impl TryFrom<Record> for Dialog
[src]

Attempt to convert Record to Dialog. This parses various meta header values to produce Dialog equivalents such as http::StatusCode and http::Method, which could fail, if the Record was not originally produced from a Dialog or was otherwise modified in an unsupported way.

impl Clone for Dialog
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Dialog
[src]

Formats the value using the given formatter. Read more

impl RequestRecorded for Dialog
[src]

Map of HTTP request headers.

Request body (e.g for HTTP POST, etc.) which may or may not be RAM resident. Read more

impl Recorded for Dialog
[src]

Map of HTTP response headers.

Response body which may or may not be RAM resident.

Auto Trait Implementations

impl Send for Dialog

impl !Sync for Dialog