pub struct Function {
pub name: String,
pub parameters: Schema,
pub returns: ObjectSchema,
pub description: Option<String>,
pub default: Option<Value>,
pub example: Option<Value>,
pub behavior: Option<FunctionBehavior>,
}Fields§
§name: StringA JavaScript identifier: programs call it as tools.{name}(args).
parameters: Schema§returns: ObjectSchemaWhat it resolves with: always an object.
description: Option<String>§default: Option<Value>§example: Option<Value>§behavior: Option<FunctionBehavior>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Function
impl<'de> Deserialize<'de> for Function
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Function
Auto Trait Implementations§
impl Forget for Function
impl Freeze for Functionwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Schema>: Freeze,
*const LeafNode<String, Schema> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Schema)>>: Freeze,
PhantomData<String>: Freeze,
*const Schema is !null: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
impl Move for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnsafeUnpin for Functionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Schema>: UnsafeUnpin,
*const LeafNode<String, Schema> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Schema)>>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const Schema is !null: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
impl UnwindSafe for Functionwhere
RawVecInner: UnwindSafe,
BTreeMap<String, Schema>: UnwindSafe,
BoxRaw<Schema>: UnwindSafe,
NonNull<u8>: UnwindSafe,
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