pub enum McpContent {
Text {
text: String,
},
Image {
data: String,
mime_type: Option<String>,
},
Resource {
resource: ResourceContent,
},
}Expand description
Stable since 0.63.0
Content types returned by MCP tool calls.Variants§
Text
Text content.
Image
Image content (base64-encoded).
Resource
Embedded resource content.
Fields
§
resource: ResourceContentTrait Implementations§
Source§impl Clone for McpContent
impl Clone for McpContent
Source§fn clone(&self) -> McpContent
fn clone(&self) -> McpContent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 McpContent
impl Debug for McpContent
Source§impl<'de> Deserialize<'de> for McpContent
impl<'de> Deserialize<'de> for McpContent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for McpContent
impl Serialize for McpContent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for McpContent
impl RefUnwindSafe for McpContent
impl Send for McpContent
impl Sync for McpContent
impl Unpin for McpContent
impl UnsafeUnpin for McpContent
impl UnwindSafe for McpContent
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