pub enum ContentBlockParam {
Text {
text: String,
},
Image {
source: ImageSource,
},
ToolUse {
id: String,
name: String,
input: Value,
},
ToolResult {
tool_use_id: String,
content: Value,
is_error: Option<bool>,
},
}Expand description
Content block parameter (similar to Anthropic SDK’s ContentBlockParam)
Variants§
Text
Text content block
Image
Image content block
Fields
§
source: ImageSourceImage source
ToolUse
Tool use content block
ToolResult
Tool result content block
Trait Implementations§
Source§impl Clone for ContentBlockParam
impl Clone for ContentBlockParam
Source§fn clone(&self) -> ContentBlockParam
fn clone(&self) -> ContentBlockParam
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 ContentBlockParam
impl Debug for ContentBlockParam
Source§impl<'de> Deserialize<'de> for ContentBlockParam
impl<'de> Deserialize<'de> for ContentBlockParam
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 Freeze for ContentBlockParam
impl RefUnwindSafe for ContentBlockParam
impl Send for ContentBlockParam
impl Sync for ContentBlockParam
impl Unpin for ContentBlockParam
impl UnsafeUnpin for ContentBlockParam
impl UnwindSafe for ContentBlockParam
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