Struct body_image::barc::Record [−][src]
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.
Methods
impl Record
[src]
impl Record
pub fn try_from(dialog: Dialog) -> Result<Record, BarcError>
[src]
pub fn try_from(dialog: Dialog) -> Result<Record, BarcError>
Attempt to convert Dialog to Record. This derives meta headers from
various dialog components, and could potentially fail when parsing
these values as header values. Once rust TryFrom
stabilizes, this
should be implemented as that trait instead.
Trait Implementations
impl Clone for Record
[src]
impl Clone for Record
fn clone(&self) -> Record
[src]
fn clone(&self) -> Record
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Record
[src]
impl Debug for Record
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for Record
[src]
impl Default for Record
impl RequestRecorded for Record
[src]
impl RequestRecorded for Record
fn req_headers(&self) -> &HeaderMap
[src]
fn req_headers(&self) -> &HeaderMap
Map of HTTP request headers.
fn req_body(&self) -> &BodyImage
[src]
fn req_body(&self) -> &BodyImage
Request body (e.g for HTTP POST, etc.) which may or may not be RAM resident. Read more
impl Recorded for Record
[src]
impl Recorded for Record
fn res_headers(&self) -> &HeaderMap
[src]
fn res_headers(&self) -> &HeaderMap
Map of HTTP response headers.
fn res_body(&self) -> &BodyImage
[src]
fn res_body(&self) -> &BodyImage
Response body which may or may not be RAM resident.
impl MetaRecorded for Record
[src]
impl MetaRecorded for Record