pub struct NullIO;Expand description
Silent I/O implementation for unit tests.
• All output methods are no-ops (nothing is printed or logged).
• confirm_destructive always returns false — destructive calls are
treated as denied. Tests that want to test the “approved” path should
use a custom AgentIO mock instead.
Trait Implementations§
Source§impl AgentIO for NullIO
impl AgentIO for NullIO
Source§fn show_status<'life0, 'life1, 'async_trait>(
&'life0 self,
_msg: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn show_status<'life0, 'life1, 'async_trait>(
&'life0 self,
_msg: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Display a progress / info message. Used for status banners like
“auto-continuing…” and “checkpoint”.
Source§fn show_tool_call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tool_name: &'life1 str,
_args_preview: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn show_tool_call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tool_name: &'life1 str,
_args_preview: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Show which tool is about to be called. Read more
Source§fn show_tool_result<'life0, 'life1, 'async_trait>(
&'life0 self,
_preview: &'life1 str,
_is_error: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn show_tool_result<'life0, 'life1, 'async_trait>(
&'life0 self,
_preview: &'life1 str,
_is_error: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Show the first line of a tool’s output after execution. Read more
Source§fn write_error<'life0, 'life1, 'async_trait>(
&'life0 self,
_msg: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_error<'life0, 'life1, 'async_trait>(
&'life0 self,
_msg: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Display an error or warning that is NOT part of a tool result.
For example, “Reached auto-continue limit” or a hard-stop warning.
Source§fn confirm_destructive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tool_name: &'life1 str,
_args_preview: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn confirm_destructive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tool_name: &'life1 str,
_args_preview: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Ask the user to confirm a destructive tool call. Read more
Auto Trait Implementations§
impl Freeze for NullIO
impl RefUnwindSafe for NullIO
impl Send for NullIO
impl Sync for NullIO
impl Unpin for NullIO
impl UnsafeUnpin for NullIO
impl UnwindSafe for NullIO
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