#[non_exhaustive]pub struct BlobResourceContents {
pub blob: String,
pub mime_type: Option<String>,
pub uri: String,
pub meta: Option<Map<String, Value>>,
}unstable_protocol_v2 only.Expand description
Binary resource contents.
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.blob: StringBase64-encoded bytes for a binary resource payload.
mime_type: Option<String>MIME type describing the encoded media payload.
uri: StringURI associated with this resource or media payload.
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 BlobResourceContents
impl BlobResourceContents
Sourcepub fn new(
blob: impl Into<String>,
uri: impl Into<String>,
) -> BlobResourceContents
pub fn new( blob: impl Into<String>, uri: impl Into<String>, ) -> BlobResourceContents
Builds BlobResourceContents with its required content payload; optional annotations and metadata start unset.
Sourcepub fn mime_type(
self,
mime_type: impl IntoOption<String>,
) -> BlobResourceContents
pub fn mime_type( self, mime_type: impl IntoOption<String>, ) -> BlobResourceContents
Sets or clears the optional mimeType field.
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> BlobResourceContents
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> BlobResourceContents
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 BlobResourceContents
impl Clone for BlobResourceContents
Source§fn clone(&self) -> BlobResourceContents
fn clone(&self) -> BlobResourceContents
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 BlobResourceContents
impl Debug for BlobResourceContents
Source§impl<'de> Deserialize<'de> for BlobResourceContents
impl<'de> Deserialize<'de> for BlobResourceContents
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BlobResourceContents, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BlobResourceContents, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl IntoV1 for BlobResourceContents
impl IntoV1 for BlobResourceContents
Source§type Output = BlobResourceContents
type Output = BlobResourceContents
Source§fn into_v1(
self,
) -> Result<<BlobResourceContents as IntoV1>::Output, ProtocolConversionError>
fn into_v1( self, ) -> Result<<BlobResourceContents as IntoV1>::Output, ProtocolConversionError>
Source§impl JsonSchema for BlobResourceContents
impl JsonSchema for BlobResourceContents
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 BlobResourceContents
impl PartialEq for BlobResourceContents
Source§fn eq(&self, other: &BlobResourceContents) -> bool
fn eq(&self, other: &BlobResourceContents) -> bool
self and other values to be equal, and is used by ==.