pub enum CallToolResultContentItem {
    TextContent(TextContent),
    ImageContent(ImageContent),
    EmbeddedResource(EmbeddedResource),
}Expand description
CallToolResultContentItem
JSON schema
{
 "anyOf": [
   {
     "$ref": "#/definitions/TextContent"
   },
   {
     "$ref": "#/definitions/ImageContent"
   },
   {
     "$ref": "#/definitions/EmbeddedResource"
   }
 ]
}Variants§
Implementations§
Source§impl CallToolResultContentItem
 
impl CallToolResultContentItem
Sourcepub fn text_content(
    test_content: String,
    annotations: Option<TextContentAnnotations>,
) -> Self
 
pub fn text_content( test_content: String, annotations: Option<TextContentAnnotations>, ) -> Self
Create a CallToolResultContentItem with text content and optional annotations
Sourcepub fn image_content(
    data: String,
    mime_type: String,
    annotations: Option<ImageContentAnnotations>,
) -> Self
 
pub fn image_content( data: String, mime_type: String, annotations: Option<ImageContentAnnotations>, ) -> Self
Create a CallToolResultContentItem with image content, with data, MIME type, and optional annotations
Sourcepub fn embedded_resource(
    resource: EmbeddedResourceResource,
    annotations: Option<EmbeddedResourceAnnotations>,
) -> Self
 
pub fn embedded_resource( resource: EmbeddedResourceResource, annotations: Option<EmbeddedResourceAnnotations>, ) -> Self
Create a CallToolResultContentItem with an embedded resource, with optional annotations
Trait Implementations§
Source§impl Clone for CallToolResultContentItem
 
impl Clone for CallToolResultContentItem
Source§fn clone(&self) -> CallToolResultContentItem
 
fn clone(&self) -> CallToolResultContentItem
Returns a copy 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 CallToolResultContentItem
 
impl Debug for CallToolResultContentItem
Source§impl<'de> Deserialize<'de> for CallToolResultContentItem
 
impl<'de> Deserialize<'de> for CallToolResultContentItem
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 From<EmbeddedResource> for CallToolResultContentItem
 
impl From<EmbeddedResource> for CallToolResultContentItem
Source§fn from(value: EmbeddedResource) -> Self
 
fn from(value: EmbeddedResource) -> Self
Converts to this type from the input type.
Source§impl From<ImageContent> for CallToolResultContentItem
 
impl From<ImageContent> for CallToolResultContentItem
Source§fn from(value: ImageContent) -> Self
 
fn from(value: ImageContent) -> Self
Converts to this type from the input type.
Source§impl From<TextContent> for CallToolResultContentItem
 
impl From<TextContent> for CallToolResultContentItem
Source§fn from(value: TextContent) -> Self
 
fn from(value: TextContent) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CallToolResultContentItem
impl RefUnwindSafe for CallToolResultContentItem
impl Send for CallToolResultContentItem
impl Sync for CallToolResultContentItem
impl Unpin for CallToolResultContentItem
impl UnwindSafe for CallToolResultContentItem
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