pub enum Content {
Show 17 variants
Text(TextContent),
Image(ImageContent),
Audio(AudioContent),
Document(DocumentContent),
Video(VideoContent),
Thought(ThoughtContent),
FunctionCall(FunctionCallContent),
FunctionResult(FunctionResultContent),
CodeExecutionCall(CodeExecutionCallContent),
CodeExecutionResult(CodeExecutionResultContent),
UrlContextCall(UrlContextCallContent),
UrlContextResult(UrlContextResultContent),
GoogleSearchCall(GoogleSearchCallContent),
GoogleSearchResult(GoogleSearchResultContent),
McpServerToolCall(McpServerToolCallContent),
McpServerToolResult(McpServerToolResultContent),
FileSearchResult(FileSearchResultContent),
}Expand description
Content item produced or consumed by the Interactions API.
Variants§
Text(TextContent)
Image(ImageContent)
Audio(AudioContent)
Document(DocumentContent)
Video(VideoContent)
Thought(ThoughtContent)
FunctionCall(FunctionCallContent)
FunctionResult(FunctionResultContent)
CodeExecutionCall(CodeExecutionCallContent)
CodeExecutionResult(CodeExecutionResultContent)
UrlContextCall(UrlContextCallContent)
UrlContextResult(UrlContextResultContent)
GoogleSearchCall(GoogleSearchCallContent)
GoogleSearchResult(GoogleSearchResultContent)
McpServerToolCall(McpServerToolCallContent)
McpServerToolResult(McpServerToolResultContent)
FileSearchResult(FileSearchResultContent)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Content
impl<'de> Deserialize<'de> for Content
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Content, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Content, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Content
impl Serialize for Content
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
Source§impl TryFrom<AssistantContent> for Content
impl TryFrom<AssistantContent> for Content
Source§type Error = MessageError
type Error = MessageError
The type returned in the event of a conversion error.
Source§fn try_from(
content: AssistantContent,
) -> Result<Content, <Content as TryFrom<AssistantContent>>::Error>
fn try_from( content: AssistantContent, ) -> Result<Content, <Content as TryFrom<AssistantContent>>::Error>
Performs the conversion.
Source§impl TryFrom<UserContent> for Content
impl TryFrom<UserContent> for Content
Source§type Error = MessageError
type Error = MessageError
The type returned in the event of a conversion error.
Source§fn try_from(
content: UserContent,
) -> Result<Content, <Content as TryFrom<UserContent>>::Error>
fn try_from( content: UserContent, ) -> Result<Content, <Content as TryFrom<UserContent>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for Content
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnsafeUnpin for Content
impl UnwindSafe for Content
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
impl<T> DebuggableStorage for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.