pub struct ToolParameter {
pub name: String,
pub required: bool,
pub description: Option<String>,
pub kind: ToolParameterKind,
}Fields§
§name: String§required: bool§description: Option<String>§kind: ToolParameterKindImplementations§
Source§impl ToolParameter
impl ToolParameter
pub fn integer(name: impl Into<String>) -> Self
pub fn number(name: impl Into<String>) -> Self
pub fn string(name: impl Into<String>) -> Self
pub fn string_with(name: impl Into<String>, enums: Vec<String>) -> Self
pub fn array(name: impl Into<String>, kind: ToolParameterKind) -> Self
pub fn object(name: impl Into<String>, field: Vec<ToolParameter>) -> Self
pub fn required(self, value: bool) -> Self
pub fn description(self, value: impl Into<String>) -> Self
pub fn to_schema(&self) -> Value
pub fn build_params_properties(params: &[ToolParameter]) -> Map<String, Value>
pub fn build_params_required(params: &[ToolParameter]) -> Vec<String>
Trait Implementations§
Source§impl Clone for ToolParameter
impl Clone for ToolParameter
Source§fn clone(&self) -> ToolParameter
fn clone(&self) -> ToolParameter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ToolParameter
impl RefUnwindSafe for ToolParameter
impl Send for ToolParameter
impl Sync for ToolParameter
impl Unpin for ToolParameter
impl UnsafeUnpin for ToolParameter
impl UnwindSafe for ToolParameter
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