pub struct ReplayTransport { /* private fields */ }Expand description
Implementations§
Source§impl ReplayTransport
impl ReplayTransport
Sourcepub fn new(events: impl IntoIterator<Item = Event>) -> Self
pub fn new(events: impl IntoIterator<Item = Event>) -> Self
A transport that answers the first run with these events, and every later run with an error.
Sourcepub fn with_runs(runs: impl IntoIterator<Item = Vec<Event>>) -> Self
pub fn with_runs(runs: impl IntoIterator<Item = Vec<Event>>) -> Self
A transport that answers each run with the next list in the script.
This is what a human-in-the-loop round trip needs: the first run pauses on an interrupt, the second — the resume — carries on.
Sourcepub fn requests(&self) -> Vec<RunAgentInput>
pub fn requests(&self) -> Vec<RunAgentInput>
Every request this transport has been handed, in order.
Sourcepub fn last_request(&self) -> Option<RunAgentInput>
pub fn last_request(&self) -> Option<RunAgentInput>
The most recent request, if there has been one.
Trait Implementations§
Source§impl Clone for ReplayTransport
impl Clone for ReplayTransport
Source§fn clone(&self) -> ReplayTransport
fn clone(&self) -> ReplayTransport
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 ReplayTransport
impl Debug for ReplayTransport
Source§impl Default for ReplayTransport
impl Default for ReplayTransport
Source§fn default() -> ReplayTransport
fn default() -> ReplayTransport
Returns the “default value” for a type. Read more
Source§impl Transport for ReplayTransport
impl Transport for ReplayTransport
Source§fn run(&self, input: RunAgentInput) -> TransportFuture
fn run(&self, input: RunAgentInput) -> TransportFuture
Starts a run and connects to its event stream. Read more
Auto Trait Implementations§
impl Freeze for ReplayTransport
impl RefUnwindSafe for ReplayTransport
impl Send for ReplayTransport
impl Sync for ReplayTransport
impl Unpin for ReplayTransport
impl UnsafeUnpin for ReplayTransport
impl UnwindSafe for ReplayTransport
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