#[non_exhaustive]pub struct EmbeddedResource {
pub resource: EmbeddedResourceResource,
pub annotations: Option<Annotations>,
pub meta: Option<Map<String, Value>>,
}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.resource: EmbeddedResourceResourceEmbedded resource payload, either text or binary data.
annotations: Option<Annotations>Optional annotations that help clients decide how to display or route this content.
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>,
impl Eq 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§impl Serialize for EmbeddedResource
impl Serialize for EmbeddedResource
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.