Struct NoOpSessionWriter
pub struct NoOpSessionWriter;Expand description
A SessionWriter that discards all writes. Used for isolated agent execution (AgentTool) where no real WebSocket exists.
Trait Implementations§
§impl SessionWriter for NoOpSessionWriter
impl SessionWriter for NoOpSessionWriter
§fn send_audio<'life0, 'async_trait>(
&'life0 self,
_data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
fn send_audio<'life0, 'async_trait>(
&'life0 self,
_data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
Send raw PCM16 audio bytes.
§fn send_text<'life0, 'async_trait>(
&'life0 self,
_text: String,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
fn send_text<'life0, 'async_trait>(
&'life0 self,
_text: String,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
Send a text message.
§fn send_tool_response<'life0, 'async_trait>(
&'life0 self,
_responses: Vec<FunctionResponse>,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
fn send_tool_response<'life0, 'async_trait>(
&'life0 self,
_responses: Vec<FunctionResponse>,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
Send tool/function call responses back to the model.
§fn send_client_content<'life0, 'async_trait>(
&'life0 self,
_turns: Vec<Content>,
_turn_complete: bool,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
fn send_client_content<'life0, 'async_trait>(
&'life0 self,
_turns: Vec<Content>,
_turn_complete: bool,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
Send client content (conversation history or context).
§fn send_video<'life0, 'async_trait>(
&'life0 self,
_jpeg_data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
fn send_video<'life0, 'async_trait>(
&'life0 self,
_jpeg_data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
Send a video/image frame (raw JPEG bytes).
§fn update_instruction<'life0, 'async_trait>(
&'life0 self,
_instruction: String,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
fn update_instruction<'life0, 'async_trait>(
&'life0 self,
_instruction: String,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
Update the system instruction mid-session.
§fn signal_activity_start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
fn signal_activity_start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
Signal that user speech activity has started.
§fn signal_activity_end<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
fn signal_activity_end<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
Signal that user speech activity has ended.
§fn disconnect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
fn disconnect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
NoOpSessionWriter: 'async_trait,
Gracefully disconnect the session.
Auto Trait Implementations§
impl Freeze for NoOpSessionWriter
impl RefUnwindSafe for NoOpSessionWriter
impl Send for NoOpSessionWriter
impl Sync for NoOpSessionWriter
impl Unpin for NoOpSessionWriter
impl UnwindSafe for NoOpSessionWriter
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