pub struct CountingBackend { /* private fields */ }Expand description
Backend that records all dispatched agent names.
Implementations§
Source§impl CountingBackend
impl CountingBackend
pub fn new(canned: Value) -> Self
pub fn dispatched_names(&self) -> Vec<String>
pub fn total_calls(&self) -> usize
Trait Implementations§
Source§impl AgentBackend for CountingBackend
impl AgentBackend for CountingBackend
Source§fn capabilities(&self) -> AgentCapabilities
fn capabilities(&self) -> AgentCapabilities
Capability declaration (v0.1: recorded/validated only; routing in v0.2).
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§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§impl Clone for CountingBackend
impl Clone for CountingBackend
Source§fn clone(&self) -> CountingBackend
fn clone(&self) -> CountingBackend
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 CountingBackend
impl RefUnwindSafe for CountingBackend
impl Send for CountingBackend
impl Sync for CountingBackend
impl Unpin for CountingBackend
impl UnsafeUnpin for CountingBackend
impl UnwindSafe for CountingBackend
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