#[non_exhaustive]pub struct EmbeddedResource {
pub annotations: Option<Annotations>,
pub resource: EmbeddedResourceResource,
pub meta: Option<Meta>,
}unstable_protocol_v2 only.Expand description
The contents of a resource, embedded into a prompt or tool call result.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.annotations: Option<Annotations>Optional annotations that help clients decide how to display or route this content.
resource: EmbeddedResourceResourceEmbedded resource payload, either text or binary data.
meta: Option<Meta>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Implementations§
Source§impl EmbeddedResource
impl EmbeddedResource
Sourcepub fn new(resource: EmbeddedResourceResource) -> Self
pub fn new(resource: EmbeddedResourceResource) -> Self
Builds EmbeddedResource with its required content payload; optional annotations and metadata start unset.
Sourcepub fn annotations(self, annotations: impl IntoOption<Annotations>) -> Self
pub fn annotations(self, annotations: impl IntoOption<Annotations>) -> Self
Sets or clears the optional annotations field.
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
pub fn meta(self, meta: impl IntoOption<Meta>) -> Self
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for EmbeddedResource
impl Clone for EmbeddedResource
Source§fn clone(&self) -> EmbeddedResource
fn clone(&self) -> EmbeddedResource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
Source§impl IntoV1 for EmbeddedResource
impl IntoV1 for EmbeddedResource
Source§impl JsonSchema for EmbeddedResource
impl JsonSchema for EmbeddedResource
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for EmbeddedResource
impl PartialEq for EmbeddedResource
Source§fn eq(&self, other: &EmbeddedResource) -> bool
fn eq(&self, other: &EmbeddedResource) -> bool
self and other values to be equal, and is used by ==.