pub struct SelfModTool { /* private fields */ }Implementations§
Source§impl SelfModTool
impl SelfModTool
Sourcepub fn with_config_validator(validator: ConfigValidator) -> Self
pub fn with_config_validator(validator: ConfigValidator) -> Self
Construct with a config write guard. Prefer this at the binary layer so
self-modifications that would corrupt config.toml are rejected.
Trait Implementations§
Source§impl Default for SelfModTool
impl Default for SelfModTool
Source§fn default() -> SelfModTool
fn default() -> SelfModTool
Returns the “default value” for a type. Read more
Source§impl Tool for SelfModTool
impl Tool for SelfModTool
fn name(&self) -> &str
fn description(&self) -> &str
fn parameters(&self) -> Value
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for SelfModTool
impl !UnwindSafe for SelfModTool
impl Freeze for SelfModTool
impl Send for SelfModTool
impl Sync for SelfModTool
impl Unpin for SelfModTool
impl UnsafeUnpin for SelfModTool
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