pub struct AcpAdapter { /* private fields */ }Expand description
ACP client backend for opencode (and compatible ACP agents).
Implementations§
Source§impl AcpAdapter
impl AcpAdapter
pub fn new(config: AcpConfig) -> Self
Sourcepub fn default_opencode() -> Self
pub fn default_opencode() -> Self
Convenience constructor for the default opencode acp backend.
Sourcepub fn config(&self) -> &AcpConfig
pub fn config(&self) -> &AcpConfig
Returns the configuration this adapter was built with. Useful for
introspection / diagnostics and for tests that need to distinguish
adapter instances beyond their AgentBackend::id.
Trait Implementations§
Source§impl AgentBackend for AcpAdapter
impl AgentBackend for AcpAdapter
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.
Auto Trait Implementations§
impl Freeze for AcpAdapter
impl RefUnwindSafe for AcpAdapter
impl Send for AcpAdapter
impl Sync for AcpAdapter
impl Unpin for AcpAdapter
impl UnsafeUnpin for AcpAdapter
impl UnwindSafe for AcpAdapter
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