pub enum MessageContentPart {
Text {
text: String,
cache_control: Option<Value>,
},
Image {
source: MessageImageContent,
cache_control: Option<Value>,
},
ToolUse {
id: String,
name: String,
input: Value,
cache_control: Option<Value>,
},
ToolResult {
tool_use_id: String,
content: String,
is_error: Option<bool>,
cache_control: Option<Value>,
},
RedactedThinking {
data: String,
},
Thinking {
thinking: String,
},
}Expand description
Message content part.
Variants§
Text
Text prompt message content part.
Image
Image prompt message content part.
Fields
§
source: MessageImageContentImage source.
ToolUse
Tool call message content part (received from model).
Fields
ToolResult
Tool call result.
Fields
RedactedThinking
(Redacted) Thinking of the model.
Thinking
Thinking of the model.
Trait Implementations§
Source§impl Clone for MessageContentPart
impl Clone for MessageContentPart
Source§fn clone(&self) -> MessageContentPart
fn clone(&self) -> MessageContentPart
Returns a duplicate of the value. Read more
1.0.0 · 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 MessageContentPart
impl Debug for MessageContentPart
Source§impl Default for MessageContentPart
impl Default for MessageContentPart
Source§impl<'de> Deserialize<'de> for MessageContentPart
impl<'de> Deserialize<'de> for MessageContentPart
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
Source§impl PartialEq for MessageContentPart
impl PartialEq for MessageContentPart
Source§impl Serialize for MessageContentPart
impl Serialize for MessageContentPart
impl StructuralPartialEq for MessageContentPart
Auto Trait Implementations§
impl Freeze for MessageContentPart
impl RefUnwindSafe for MessageContentPart
impl Send for MessageContentPart
impl Sync for MessageContentPart
impl Unpin for MessageContentPart
impl UnwindSafe for MessageContentPart
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