pub struct EmbeddedResource {
pub resource: ResourceContents,
pub annotations: Option<Annotations>,
pub meta: Option<Value>,
}Expand description
The contents of a resource, embedded into a prompt or tool call result.
It is up to the client how best to render embedded resources for the benefit of the LLM and/or the user.
See the schema for details
Fields§
§resource: ResourceContentsThe resource content of the message.
annotations: Option<Annotations>Optional annotations for the client.
meta: Option<Value>Metadata reserved by MCP for protocol-level metadata.
Implementations§
Source§impl EmbeddedResource
impl EmbeddedResource
Sourcepub fn new(resource: impl Into<ResourceContents>) -> Self
pub fn new(resource: impl Into<ResourceContents>) -> Self
Creates a new EmbeddedResource content
Trait Implementations§
Source§impl Debug for EmbeddedResource
impl Debug for EmbeddedResource
Source§impl<'de> Deserialize<'de> for EmbeddedResource
impl<'de> Deserialize<'de> for EmbeddedResource
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 Content
impl From<EmbeddedResource> for Content
Source§fn from(value: EmbeddedResource) -> Self
fn from(value: EmbeddedResource) -> Self
Converts to this type from the input type.
Source§impl Serialize for EmbeddedResource
impl Serialize for EmbeddedResource
Auto Trait Implementations§
impl !Freeze for EmbeddedResource
impl RefUnwindSafe for EmbeddedResource
impl Send for EmbeddedResource
impl Sync for EmbeddedResource
impl Unpin for EmbeddedResource
impl UnwindSafe for EmbeddedResource
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