pub struct AcpClient { /* private fields */ }Expand description
ACP Client for communicating with remote agents
Implementations§
Source§impl AcpClient
impl AcpClient
Sourcepub fn new(local_agent_id: String) -> AcpResult<Self>
pub fn new(local_agent_id: String) -> AcpResult<Self>
Create a new ACP client with default settings
Sourcepub fn registry(&self) -> &AgentRegistry
pub fn registry(&self) -> &AgentRegistry
Get the agent registry
Sourcepub async fn call_sync(
&self,
remote_agent_id: &str,
action: String,
args: Value,
) -> AcpResult<Value>
pub async fn call_sync( &self, remote_agent_id: &str, action: String, args: Value, ) -> AcpResult<Value>
Send a request to a remote agent synchronously
Sourcepub async fn call_async(
&self,
remote_agent_id: &str,
action: String,
args: Value,
) -> AcpResult<String>
pub async fn call_async( &self, remote_agent_id: &str, action: String, args: Value, ) -> AcpResult<String>
Send a request to a remote agent asynchronously
Sourcepub async fn discover_agent(&self, base_url: &str) -> AcpResult<AgentInfo>
pub async fn discover_agent(&self, base_url: &str) -> AcpResult<AgentInfo>
Discover agent metadata from base URL (offline discovery)
Auto Trait Implementations§
impl Freeze for AcpClient
impl !RefUnwindSafe for AcpClient
impl Send for AcpClient
impl Sync for AcpClient
impl Unpin for AcpClient
impl !UnwindSafe for AcpClient
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