pub enum AnyConnection {
Local(Arc<LocalConnection>),
}Expand description
A target-agnostic wrapper enum for active connection types.
Variants§
Local(Arc<LocalConnection>)
Trait Implementations§
Source§impl Clone for AnyConnection
impl Clone for AnyConnection
Source§fn clone(&self) -> AnyConnection
fn clone(&self) -> AnyConnection
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 moreSource§impl Connection for AnyConnection
impl Connection for AnyConnection
Source§fn conversation_id(&self) -> &str
fn conversation_id(&self) -> &str
Returns the conversation ID for the connection.
Source§fn receive_steps(&self) -> BoxStream<'static, Result<Step, Error>>
fn receive_steps(&self) -> BoxStream<'static, Result<Step, Error>>
Subscribes to the stream of step updates from the connection.
Source§async fn send(&self, content: &str) -> Result<(), Error>
async fn send(&self, content: &str) -> Result<(), Error>
Sends a standard user text prompt to the connection.
Source§async fn send_trigger_notification(&self, content: &str) -> Result<(), Error>
async fn send_trigger_notification(&self, content: &str) -> Result<(), Error>
Sends a trigger notification message to the connection.
Source§async fn send_halt_request(&self) -> Result<(), Error>
async fn send_halt_request(&self) -> Result<(), Error>
Sends a halt/cancellation request to the connection.
Source§async fn send_tool_confirmation(
&self,
trajectory_id: &str,
step_index: u32,
accepted: bool,
) -> Result<(), Error>
async fn send_tool_confirmation( &self, trajectory_id: &str, step_index: u32, accepted: bool, ) -> Result<(), Error>
Sends approval/rejection for a tool execution confirmation request.
Source§async fn send_tool_response(
&self,
id: &str,
result: ToolResult,
) -> Result<(), Error>
async fn send_tool_response( &self, id: &str, result: ToolResult, ) -> Result<(), Error>
Sends the result of a tool execution back to the connection.
Source§async fn send_question_response(
&self,
trajectory_id: &str,
step_index: u32,
answers: QuestionHookResult,
) -> Result<(), Error>
async fn send_question_response( &self, trajectory_id: &str, step_index: u32, answers: QuestionHookResult, ) -> Result<(), Error>
Sends the answers to user questions back to the connection.
Auto Trait Implementations§
impl Freeze for AnyConnection
impl !RefUnwindSafe for AnyConnection
impl Send for AnyConnection
impl Sync for AnyConnection
impl Unpin for AnyConnection
impl UnsafeUnpin for AnyConnection
impl !UnwindSafe for AnyConnection
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