pub trait ToolSession: Send + Sync {
// Required methods
fn cwd(&self) -> &PathBuf;
fn workspace_root(&self) -> &PathBuf;
fn record_warning<'life0, 'async_trait>(
&'life0 self,
message: String,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn user_shell(&self) -> &str;
fn send_event<'life0, 'async_trait>(
&'life0 self,
event: ToolEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Session trait for tool execution context
Required Methods§
Sourcefn workspace_root(&self) -> &PathBuf
fn workspace_root(&self) -> &PathBuf
Get workspace root
Sourcefn record_warning<'life0, 'async_trait>(
&'life0 self,
message: String,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn record_warning<'life0, 'async_trait>(
&'life0 self,
message: String,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Record a warning message
Sourcefn user_shell(&self) -> &str
fn user_shell(&self) -> &str
Get user’s configured shell
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".