pub struct RunHandle { /* private fields */ }Expand description
A handle that keeps a MockAgentSession’s run alive and ends it on demand.
The session’s event stream drains a channel; holding this sender keeps the stream open (the run
stays live so a driver can deliver commands mid-run), and dropping it — via Self::end_run or
simply letting it fall out of scope — ends the stream, at which point the worker driver takes the
terminal result. This mirrors the worker’s real lifecycle, where the run ends when the harness’s
event stream closes, not when a command arrives.
Implementations§
Auto Trait Implementations§
impl Freeze for RunHandle
impl RefUnwindSafe for RunHandle
impl Send for RunHandle
impl Sync for RunHandle
impl Unpin for RunHandle
impl UnsafeUnpin for RunHandle
impl UnwindSafe for RunHandle
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