pub struct RecordedRequest {
pub method: String,
pub path: String,
pub query: Option<String>,
pub headers: Vec<(String, String)>,
pub body: Vec<u8>,
pub timestamp: Instant,
}Expand description
A recorded request from the mock server.
Contains all information about a request that was made to the mock server, useful for asserting that expected requests were made.
Fields§
§method: StringThe HTTP method (GET, POST, etc.)
path: StringThe request path (e.g., “/api/users”)
query: Option<String>Query string if present (without the leading ‘?’)
headers: Vec<(String, String)>Request headers as name-value pairs
body: Vec<u8>Request body as bytes
timestamp: InstantTimestamp when the request was received
Implementations§
Trait Implementations§
Source§impl Clone for RecordedRequest
impl Clone for RecordedRequest
Source§fn clone(&self) -> RecordedRequest
fn clone(&self) -> RecordedRequest
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 moreAuto Trait Implementations§
impl Freeze for RecordedRequest
impl RefUnwindSafe for RecordedRequest
impl Send for RecordedRequest
impl Sync for RecordedRequest
impl Unpin for RecordedRequest
impl UnwindSafe for RecordedRequest
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: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).