[][src]Struct barc::Record

pub struct Record {
    pub rec_type: RecordType,
    pub meta: HeaderMap,
    pub req_headers: HeaderMap,
    pub req_body: BodyImage,
    pub res_headers: HeaderMap,
    pub res_body: BodyImage,
}

An owned BARC record with public fields.

Additonal getter methods are found in trait implementations RequestRecorded, Recorded, and MetaRecorded.

Fields

rec_type: RecordType

Record type.

meta: HeaderMap

Map of meta-headers for values which are not strictly part of the HTTP request or response headers. This can be extended with application specific name/value pairs.

req_headers: HeaderMap

Map of HTTP request headers.

req_body: BodyImage

Request body which may or may not be RAM resident.

res_headers: HeaderMap

Map of HTTP response headers.

res_body: BodyImage

Response body which may or may not be RAM resident.

Trait Implementations

impl Clone for Record[src]

impl Debug for Record[src]

impl Default for Record[src]

impl MetaRecorded for Record[src]

impl Recorded for Record[src]

impl RequestRecorded for Record[src]

impl TryFrom<Dialog> for Record[src]

type Error = BarcError

The type returned in the event of a conversion error.

pub fn try_from(dialog: Dialog) -> Result<Self, Self::Error>[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.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,