pub struct ReplayToolHost { /* private fields */ }Expand description
Serves recorded tool results in order.
The same bargain ReplayProvider strikes, for the other half of a run: no
server is started, nothing is reached, and a call the recording does not
match fails loudly rather than being answered from the wrong row.
Implementations§
Source§impl ReplayToolHost
impl ReplayToolHost
pub fn new(calls: Vec<ToolExchange>) -> ReplayToolHost
pub fn lenient(self) -> ReplayToolHost
Sourcepub fn skipping(self, played: usize) -> ReplayToolHost
pub fn skipping(self, played: usize) -> ReplayToolHost
Start at played, for continuing an interrupted run. See
ReplayProvider::skipping.
Trait Implementations§
Source§impl ToolHost for ReplayToolHost
impl ToolHost for ReplayToolHost
Source§fn provides(&self, _tool: &str) -> bool
fn provides(&self, _tool: &str) -> bool
Every tool, because what a replay can serve is decided by the recording
rather than by a table of names. A call beyond the recording is reported
by ToolHost::call, where the position is known and the message can
say which call it was.
fn name(&self) -> &str
fn call(&mut self, invocation: &ToolInvocation) -> Result<Value, ToolError>
Auto Trait Implementations§
impl Freeze for ReplayToolHost
impl RefUnwindSafe for ReplayToolHost
impl Send for ReplayToolHost
impl Sync for ReplayToolHost
impl Unpin for ReplayToolHost
impl UnsafeUnpin for ReplayToolHost
impl UnwindSafe for ReplayToolHost
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