pub enum Item {
System {
text: String,
},
User {
text: String,
synthetic: Option<SyntheticReason>,
},
Assistant {
blocks: Vec<Value>,
},
ToolResults {
results: Vec<ToolResultItem>,
},
Unknown,
}Expand description
One conversation item. Internally tagged so #[serde(other)] can absorb
item kinds this binary doesn’t know yet (payload dropped, no crash).
Variants§
System
User
Assistant
Verbatim provider content blocks (text / tool_use / thinking / …).
ToolResults
All results for one assistant turn’s tool calls, in source order (the API requires them in a single user message).
Fields
§
results: Vec<ToolResultItem>Unknown
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Item
impl<'de> Deserialize<'de> for Item
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 Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
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