#[non_exhaustive]pub enum ToolResultContentPart {
Text {
text: String,
provider_options: Option<BTreeMap<String, Map<String, Value>>>,
},
File {
data: FileData,
media_type: MediaType,
filename: Option<String>,
provider_options: Option<BTreeMap<String, Map<String, Value>>>,
},
Custom {
provider_options: Option<BTreeMap<String, Map<String, Value>>>,
},
}Expand description
A part of a multi-part tool result.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text
Text.
Fields
File
A file.
Fields
Custom
Provider-specific content carried entirely in provider options.
Trait Implementations§
Source§impl Clone for ToolResultContentPart
impl Clone for ToolResultContentPart
Source§fn clone(&self) -> ToolResultContentPart
fn clone(&self) -> ToolResultContentPart
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 ToolResultContentPart
impl Debug for ToolResultContentPart
Source§impl<'de> Deserialize<'de> for ToolResultContentPart
impl<'de> Deserialize<'de> for ToolResultContentPart
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolResultContentPart, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolResultContentPart, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ToolResultContentPart
impl PartialEq for ToolResultContentPart
Source§impl Serialize for ToolResultContentPart
impl Serialize for ToolResultContentPart
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 ToolResultContentPart
Auto Trait Implementations§
impl !Freeze for ToolResultContentPart
impl RefUnwindSafe for ToolResultContentPart
impl Send for ToolResultContentPart
impl Sync for ToolResultContentPart
impl Unpin for ToolResultContentPart
impl UnsafeUnpin for ToolResultContentPart
impl UnwindSafe for ToolResultContentPart
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