pub struct ToolSpec {
pub name: String,
pub version: String,
pub side_effect: String,
pub risk_level: String,
pub idempotency_required: bool,
pub approval_required: bool,
pub sandbox_required: bool,
pub input_schema: Option<Value>,
pub output_schema: Option<Value>,
pub func: ToolFunc,
}Fields§
§name: String§version: String§side_effect: String§risk_level: String§idempotency_required: bool§approval_required: bool§sandbox_required: bool§input_schema: Option<Value>§output_schema: Option<Value>§func: ToolFuncImplementations§
Source§impl ToolSpec
impl ToolSpec
pub fn new(name: &str, func: ToolFunc) -> Self
pub fn side_effect(self, side_effect: &str) -> Self
pub fn risk_level(self, risk_level: &str) -> Self
pub fn idempotency_required(self, required: bool) -> Self
pub fn approval_required(self, required: bool) -> Self
pub fn sandbox_required(self, required: bool) -> Self
pub fn input_schema(self, schema: Value) -> Self
pub fn output_schema(self, schema: Value) -> Self
Auto Trait Implementations§
impl Freeze for ToolSpec
impl !RefUnwindSafe for ToolSpec
impl Send for ToolSpec
impl Sync for ToolSpec
impl Unpin for ToolSpec
impl UnsafeUnpin for ToolSpec
impl !UnwindSafe for ToolSpec
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