pub struct MockBackend { /* private fields */ }Implementations§
Source§impl MockBackend
impl MockBackend
pub fn new(id: &'static str, behaviors: Vec<MockBehavior>) -> Self
Sourcepub fn call_count(&self) -> u32
pub fn call_count(&self) -> u32
Number of times run() has been invoked.
Trait Implementations§
Source§impl AgentBackend for MockBackend
impl AgentBackend for MockBackend
Source§fn capabilities(&self) -> AgentCapabilities
fn capabilities(&self) -> AgentCapabilities
Capability declaration (v0.1: recorded/validated only; routing in v0.2).
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Upcast hook for downcasting
&dyn AgentBackend back to a concrete
backend type. Standard Rust trait-object downcast pattern: each impl
returns self, which Any::downcast_ref then narrows to &Concrete.
No default impl is provided — Self is unsized on a trait object, so a
default body self would not compile.Source§fn run<'life0, 'async_trait>(
&'life0 self,
task: AgentTask,
ctx: RunContext,
) -> Pin<Box<dyn Future<Output = Result<AgentResult, BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
task: AgentTask,
ctx: RunContext,
) -> Pin<Box<dyn Future<Output = Result<AgentResult, BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run one agent task to completion.
Source§impl Clone for MockBackend
impl Clone for MockBackend
Source§fn clone(&self) -> MockBackend
fn clone(&self) -> MockBackend
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 moreAuto Trait Implementations§
impl Freeze for MockBackend
impl RefUnwindSafe for MockBackend
impl Send for MockBackend
impl Sync for MockBackend
impl Unpin for MockBackend
impl UnsafeUnpin for MockBackend
impl UnwindSafe for MockBackend
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