pub struct SharedBackend {
pub block_on: Arc<Mutex<Option<u64>>>,
pub fail_on: Arc<Mutex<Option<u64>>>,
/* private fields */
}Expand description
Backend with shared state via Arc for resume tests.
Fields§
§block_on: Arc<Mutex<Option<u64>>>§fail_on: Arc<Mutex<Option<u64>>>Implementations§
pub fn new(canned: Value) -> Self
pub fn with_block_on(self, n: u64) -> Self
pub fn with_fail_on(self, n: u64) -> Self
pub fn total_calls(&self) -> usize
pub fn calls_snapshot(&self) -> Vec<CallRecord>
pub fn dispatched_names(&self) -> Vec<String>
pub fn mirror(&self) -> Self
Trait Implementations§
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§fn clone(&self) -> SharedBackend
fn clone(&self) -> SharedBackend
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§
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