pub enum ModelItemContent {
Parts(Vec<ContentPart>),
ToolCall(ToolCallDraft),
}Expand description
The content of a ModelItem.
Exhaustive on purpose: conversion to blocks handles every shape, so a new one is a breaking change.
Serializable for logs and tests; the serialized form is not part of the stable set and may change in any release.
Variants§
Parts(Vec<ContentPart>)
Ordered content parts (text and sealed items) that commit as one
BlockContent::Message block with
Role::Assistant.
ToolCall(ToolCallDraft)
A tool call that commits as one ToolCall block.
Trait Implementations§
Source§impl Clone for ModelItemContent
impl Clone for ModelItemContent
Source§impl Debug for ModelItemContent
impl Debug for ModelItemContent
Source§impl<'de> Deserialize<'de> for ModelItemContent
impl<'de> Deserialize<'de> for ModelItemContent
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
Auto Trait Implementations§
impl Forget for ModelItemContent
impl Freeze for ModelItemContent
impl Move for ModelItemContent
impl RefUnwindSafe for ModelItemContent
impl Send for ModelItemContent
impl Sync for ModelItemContent
impl Unpin for ModelItemContent
impl UnsafeUnpin for ModelItemContent
impl UnwindSafe for ModelItemContent
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