pub struct McpContent {
pub kind: &'static str,
pub text: String,
pub mime_type: Option<String>,
}Expand description
Content returned by tool and resource handlers.
Create with McpContent::text (plain text or JSON strings) or
McpContent::json (marks MIME type as application/json).
Fields§
§kind: &'static strAlways "text" in the current MCP spec.
text: StringThe content string.
mime_type: Option<String>Optional MIME type override (default "text/plain").
Implementations§
Trait 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 moreAuto 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