pub struct EmbeddedResource {
pub annotations: Option<Annotations>,
pub resource: EmbeddedResourceResource,
pub type_: String,
}
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.
JSON schema
{
"description": "The contents of a resource, embedded into a prompt or tool call result.\n\nIt is up to the client how best to render embedded resources for the benefit\nof the LLM and/or the user.",
"type": "object",
"required": [
"resource",
"type"
],
"properties": {
"annotations": {
"description": "Optional annotations for the client.",
"$ref": "#/definitions/Annotations"
},
"resource": {
"anyOf": [
{
"$ref": "#/definitions/TextResourceContents"
},
{
"$ref": "#/definitions/BlobResourceContents"
}
]
},
"type": {
"type": "string",
"const": "resource"
}
}
}
Fields§
§annotations: Option<Annotations>
Optional annotations for the client.
resource: EmbeddedResourceResource
§type_: String
Implementations§
Source§impl EmbeddedResource
impl EmbeddedResource
pub fn new(resource: impl Into<EmbeddedResourceResource>) -> Self
Trait Implementations§
Source§impl Clone for EmbeddedResource
impl Clone for EmbeddedResource
Source§fn clone(&self) -> EmbeddedResource
fn clone(&self) -> EmbeddedResource
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 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 CallToolResult
impl From<&EmbeddedResource> for CallToolResult
Source§fn from(value: &EmbeddedResource) -> Self
fn from(value: &EmbeddedResource) -> Self
Converts to this type from the input type.
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<&EmbeddedResource> for EmbeddedResource
impl From<&EmbeddedResource> for EmbeddedResource
Source§fn from(value: &EmbeddedResource) -> Self
fn from(value: &EmbeddedResource) -> Self
Converts to this type from the input type.
Source§impl From<&EmbeddedResource> for GetPromptResult
impl From<&EmbeddedResource> for GetPromptResult
Source§fn from(value: &EmbeddedResource) -> Self
fn from(value: &EmbeddedResource) -> Self
Converts to this type from the input type.
Source§impl From<&EmbeddedResource> for PromptMessage
impl From<&EmbeddedResource> for PromptMessage
Source§fn from(value: &EmbeddedResource) -> Self
fn from(value: &EmbeddedResource) -> Self
Converts to this type from the input type.
Source§impl From<&EmbeddedResource> for PromptMessageContent
impl From<&EmbeddedResource> for PromptMessageContent
Source§fn from(value: &EmbeddedResource) -> Self
fn from(value: &EmbeddedResource) -> Self
Converts to this type from the input type.
Source§impl From<&EmbeddedResource> for ServerResult
impl From<&EmbeddedResource> for ServerResult
Source§fn from(value: &EmbeddedResource) -> Self
fn from(value: &EmbeddedResource) -> Self
Converts to this type from the input type.
Source§impl From<EmbeddedResource> for CallToolResult
impl From<EmbeddedResource> for CallToolResult
Source§fn from(value: EmbeddedResource) -> Self
fn from(value: EmbeddedResource) -> Self
Converts to this type from the input type.
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<EmbeddedResource> for GetPromptResult
impl From<EmbeddedResource> for GetPromptResult
Source§fn from(value: EmbeddedResource) -> Self
fn from(value: EmbeddedResource) -> Self
Converts to this type from the input type.
Source§impl From<EmbeddedResource> for PromptMessage
impl From<EmbeddedResource> for PromptMessage
Source§fn from(value: EmbeddedResource) -> Self
fn from(value: EmbeddedResource) -> Self
Converts to this type from the input type.
Source§impl From<EmbeddedResource> for PromptMessageContent
impl From<EmbeddedResource> for PromptMessageContent
Source§fn from(value: EmbeddedResource) -> Self
fn from(value: EmbeddedResource) -> Self
Converts to this type from the input type.
Source§impl From<EmbeddedResource> for ServerResult
impl From<EmbeddedResource> for ServerResult
Source§fn from(value: EmbeddedResource) -> Self
fn from(value: EmbeddedResource) -> Self
Converts to this type from the input type.
Source§impl PartialEq for EmbeddedResource
impl PartialEq for EmbeddedResource
Source§impl Serialize for EmbeddedResource
impl Serialize for EmbeddedResource
impl StructuralPartialEq 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