pub struct AcpPromptHandle { /* private fields */ }Expand description
Send-safe handle for issuing prompt commands to the !Send ACP connection.
Implementations§
Source§impl AcpPromptHandle
impl AcpPromptHandle
Sourcepub fn noop() -> Self
pub fn noop() -> Self
Create a handle whose sends always succeed but are never read. Useful for tests that don’t care about prompt delivery.
Sourcepub fn recording() -> (Self, UnboundedReceiver<PromptCommand>)
pub fn recording() -> (Self, UnboundedReceiver<PromptCommand>)
Create a handle paired with a receiver for inspecting sent commands. Useful for tests that need to verify which commands were dispatched.
pub fn prompt( &self, session_id: &SessionId, text: &str, content: Option<Vec<ContentBlock>>, ) -> Result<(), AcpClientError>
pub fn cancel(&self, session_id: &SessionId) -> Result<(), AcpClientError>
pub fn set_config_option( &self, session_id: &SessionId, config_id: &str, value: &str, ) -> Result<(), AcpClientError>
pub fn authenticate_mcp_server( &self, session_id: &SessionId, server_name: &str, ) -> Result<(), AcpClientError>
pub fn authenticate( &self, session_id: &SessionId, method_id: &str, ) -> Result<(), AcpClientError>
pub fn list_sessions(&self) -> Result<(), AcpClientError>
pub fn load_session( &self, session_id: &SessionId, cwd: &Path, ) -> Result<(), AcpClientError>
pub fn new_session(&self, cwd: &Path) -> Result<(), AcpClientError>
Trait Implementations§
Source§impl Clone for AcpPromptHandle
impl Clone for AcpPromptHandle
Source§fn clone(&self) -> AcpPromptHandle
fn clone(&self) -> AcpPromptHandle
Returns a duplicate of the value. Read more
1.0.0 · 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 AcpPromptHandle
impl RefUnwindSafe for AcpPromptHandle
impl Send for AcpPromptHandle
impl Sync for AcpPromptHandle
impl Unpin for AcpPromptHandle
impl UnsafeUnpin for AcpPromptHandle
impl UnwindSafe for AcpPromptHandle
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