pub struct ReplayEngine { /* private fields */ }Expand description
Replay engine for executing recorded requests
Implementations§
Source§impl ReplayEngine
impl ReplayEngine
Sourcepub fn new(db: RecorderDatabase) -> Self
pub fn new(db: RecorderDatabase) -> Self
Create a new replay engine
Sourcepub async fn replay_request(&self, request_id: &str) -> Result<ReplayResult>
pub async fn replay_request(&self, request_id: &str) -> Result<ReplayResult>
Replay a single request by ID
Sourcepub async fn replay_batch(&self, limit: i32) -> Result<Vec<ReplayResult>>
pub async fn replay_batch(&self, limit: i32) -> Result<Vec<ReplayResult>>
Replay multiple requests matching a filter
Sourcepub async fn compare_responses(
&self,
request_id: &str,
replay_response_body: &[u8],
replay_status: i32,
replay_headers: &HashMap<String, String>,
) -> Result<ComparisonResult>
pub async fn compare_responses( &self, request_id: &str, replay_response_body: &[u8], replay_status: i32, replay_headers: &HashMap<String, String>, ) -> Result<ComparisonResult>
Compare original and replayed responses
Auto Trait Implementations§
impl Freeze for ReplayEngine
impl !RefUnwindSafe for ReplayEngine
impl Send for ReplayEngine
impl Sync for ReplayEngine
impl Unpin for ReplayEngine
impl !UnwindSafe for ReplayEngine
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> 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