pub struct ModelToolCall { /* private fields */ }Expand description
Provider-neutral tool call requested by a model.
Implementations§
Source§impl ModelToolCall
impl ModelToolCall
Sourcepub fn new(
id: ModelToolCallId,
name: ToolName,
arguments: ToolArguments,
) -> ModelToolCall
pub fn new( id: ModelToolCallId, name: ToolName, arguments: ToolArguments, ) -> ModelToolCall
Creates a model tool call from validated parts.
Sourcepub fn id(&self) -> &ModelToolCallId
pub fn id(&self) -> &ModelToolCallId
Borrows the provider-originated call id.
Sourcepub fn arguments(&self) -> &ToolArguments
pub fn arguments(&self) -> &ToolArguments
Borrows the JSON object arguments.
Trait Implementations§
Source§impl Clone for ModelToolCall
impl Clone for ModelToolCall
Source§fn clone(&self) -> ModelToolCall
fn clone(&self) -> ModelToolCall
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelToolCall
impl Debug for ModelToolCall
Source§impl<'de> Deserialize<'de> for ModelToolCall
impl<'de> Deserialize<'de> for ModelToolCall
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ModelToolCall, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ModelToolCall, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ModelToolCall
impl JsonSchema for ModelToolCall
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ModelToolCall
impl PartialEq for ModelToolCall
Source§impl Serialize for ModelToolCall
impl Serialize for ModelToolCall
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ModelToolCall
Auto Trait Implementations§
impl Forget for ModelToolCall
impl Freeze for ModelToolCall
impl Move for ModelToolCall
impl RefUnwindSafe for ModelToolCall
impl Send for ModelToolCall
impl Sync for ModelToolCall
impl Unpin for ModelToolCall
impl UnsafeUnpin for ModelToolCallwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for ModelToolCall
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