pub struct MockAgentSession { /* private fields */ }Expand description
The live session the mock produces: it streams a fixed transcript, gates commands on the
advertised set, and drains an event channel whose sender (the RunHandle) a driver holds so
the run stays live until the driver ends it.
Trait Implementations§
Source§impl AgentSession for MockAgentSession
impl AgentSession for MockAgentSession
Source§fn capabilities(&self) -> &InterventionCapabilities
fn capabilities(&self) -> &InterventionCapabilities
The capability set negotiated at start. Read more
Source§fn events(&mut self) -> BoxStream<'static, ActivityEvent>
fn events(&mut self) -> BoxStream<'static, ActivityEvent>
The stream of neutral events produced by this run. Read more
Auto Trait Implementations§
impl Freeze for MockAgentSession
impl RefUnwindSafe for MockAgentSession
impl Send for MockAgentSession
impl Sync for MockAgentSession
impl Unpin for MockAgentSession
impl UnsafeUnpin for MockAgentSession
impl UnwindSafe for MockAgentSession
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<S> DynAgentSession for Swhere
S: AgentSession + 'static,
impl<S> DynAgentSession for Swhere
S: AgentSession + 'static,
Source§fn capabilities(&self) -> &InterventionCapabilities
fn capabilities(&self) -> &InterventionCapabilities
The negotiated capability set — see
AgentSession::capabilities.Source§fn events(&mut self) -> Pin<Box<dyn Stream<Item = ActivityEvent> + Send>>
fn events(&mut self) -> Pin<Box<dyn Stream<Item = ActivityEvent> + Send>>
The neutral event stream OUT — see
AgentSession::events.Source§fn intervene<'life0, 'async_trait>(
&'life0 self,
cmd: InterventionCommand,
) -> Pin<Box<dyn Future<Output = Result<(), HarnessError>> + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn intervene<'life0, 'async_trait>(
&'life0 self,
cmd: InterventionCommand,
) -> Pin<Box<dyn Future<Output = Result<(), HarnessError>> + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Deliver a neutral command IN — see
AgentSession::intervene. Read moreSource§fn wait_result<'async_trait>(
self: Box<S>,
) -> Pin<Box<dyn Future<Output = Result<Payload, HarnessError>> + 'async_trait>>where
S: 'async_trait,
fn wait_result<'async_trait>(
self: Box<S>,
) -> Pin<Box<dyn Future<Output = Result<Payload, HarnessError>> + 'async_trait>>where
S: 'async_trait,
Await the single terminal result — see
AgentSession::wait_result. Takes
Box<Self> (not self) so the trait stays object-safe. Read more