#[non_exhaustive]pub struct EmbeddedResource {
pub annotations: Option<Annotations>,
pub resource: EmbeddedResourceResource,
pub meta: Option<Map<String, Value>>,
}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<Map<String, Value>>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) -> EmbeddedResource
pub fn new(resource: EmbeddedResourceResource) -> EmbeddedResource
Builds EmbeddedResource with its required content payload; optional annotations and metadata start unset.
Sourcepub fn annotations(
self,
annotations: impl IntoOption<Annotations>,
) -> EmbeddedResource
pub fn annotations( self, annotations: impl IntoOption<Annotations>, ) -> EmbeddedResource
Sets or clears the optional annotations field.
Sourcepub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> EmbeddedResource
pub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> EmbeddedResource
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<EmbeddedResource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EmbeddedResource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl IntoV2 for EmbeddedResource
impl IntoV2 for EmbeddedResource
Source§type Output = EmbeddedResource
type Output = EmbeddedResource
Source§fn into_v2(
self,
) -> Result<<EmbeddedResource as IntoV2>::Output, ProtocolConversionError>
fn into_v2( self, ) -> Result<<EmbeddedResource as IntoV2>::Output, ProtocolConversionError>
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 ==.