pub struct OwnedCapture {
pub request_id: String,
pub method: HttpMethod,
pub path: String,
pub query: Option<String>,
pub headers: Vec<(String, String)>,
pub body: Vec<u8>,
pub response_status: u16,
pub response_body: Vec<u8>,
}Expand description
An owned copy of a captured exchange, for the in-memory reference recorder.
Fields§
§request_id: String§method: HttpMethod§path: StringSee CaptureRecord::path.
query: Option<String>See CaptureRecord::query.
headers: Vec<(String, String)>§body: Vec<u8>See CaptureRecord::body.
response_status: u16§response_body: Vec<u8>Implementations§
Source§impl OwnedCapture
impl OwnedCapture
Sourcepub fn from_record(record: &CaptureRecord<'_>) -> Self
pub fn from_record(record: &CaptureRecord<'_>) -> Self
Copies a borrowed record into an owned one.
Trait Implementations§
Source§impl Clone for OwnedCapture
impl Clone for OwnedCapture
Source§fn clone(&self) -> OwnedCapture
fn clone(&self) -> OwnedCapture
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OwnedCapture
impl Debug for OwnedCapture
impl Eq for OwnedCapture
Source§impl PartialEq for OwnedCapture
impl PartialEq for OwnedCapture
Source§fn eq(&self, other: &OwnedCapture) -> bool
fn eq(&self, other: &OwnedCapture) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OwnedCapture
Auto Trait Implementations§
impl Freeze for OwnedCapture
impl RefUnwindSafe for OwnedCapture
impl Send for OwnedCapture
impl Sync for OwnedCapture
impl Unpin for OwnedCapture
impl UnsafeUnpin for OwnedCapture
impl UnwindSafe for OwnedCapture
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more