[−][src]Struct barc::Record
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.
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.
impl TryFrom<Record> for Dialog
[src]
type Error = DialogConvertError
The type returned in the event of a conversion error.
fn try_from(rec: Record) -> Result<Self, Self::Error>
[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.
Auto Trait Implementations
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,