pub struct RecordedResponse {
pub request_id: String,
pub status_code: i32,
pub headers: String,
pub body: Option<String>,
pub body_encoding: String,
pub size_bytes: i64,
pub timestamp: DateTime<Utc>,
}Expand description
Recorded response
Fields§
§request_id: StringResponse ID (same as request ID)
status_code: i32Response status code
headers: StringResponse headers (JSON)
body: Option<String>Response body (may be base64 encoded for binary)
body_encoding: StringBody encoding (utf8, base64)
size_bytes: i64Response size in bytes
timestamp: DateTime<Utc>Timestamp
Implementations§
Source§impl RecordedResponse
impl RecordedResponse
Sourcepub fn headers_map(&self) -> HashMap<String, String>
pub fn headers_map(&self) -> HashMap<String, String>
Parse headers from JSON string
Sourcepub fn decoded_body(&self) -> Option<Vec<u8>>
pub fn decoded_body(&self) -> Option<Vec<u8>>
Decode body based on encoding
Trait Implementations§
Source§impl Clone for RecordedResponse
impl Clone for RecordedResponse
Source§fn clone(&self) -> RecordedResponse
fn clone(&self) -> RecordedResponse
Returns a duplicate of the value. Read more
1.0.0 · 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 RecordedResponse
impl Debug for RecordedResponse
Source§impl<'de> Deserialize<'de> for RecordedResponse
impl<'de> Deserialize<'de> for RecordedResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'r> FromRow<'r, SqliteRow> for RecordedResponse
impl<'r> FromRow<'r, SqliteRow> for RecordedResponse
Auto Trait Implementations§
impl Freeze for RecordedResponse
impl RefUnwindSafe for RecordedResponse
impl Send for RecordedResponse
impl Sync for RecordedResponse
impl Unpin for RecordedResponse
impl UnwindSafe for RecordedResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more