pub struct A2CResource {
pub uri: Option<String>,
pub name: Option<String>,
pub description: Option<String>,
pub mime_type: Option<String>,
pub size: Option<u64>,
pub annotations: Option<ResourceAnnotations>,
pub meta: Option<Value>,
}Expand description
A2C 协议层 Resource,snake_case mirror MCP Resource / A2C protocol-level Resource。
全字段可选(对标 Python A2CResource(TypedDict, total=False))。元数据分工 / metadata partition:
annotations:MCP 标准字段(priority / audience / last_modified)。_meta(A2CResource::meta):A2C 扩展(如 fullscreen 等业务字段)。
Fields§
§uri: Option<String>资源 URI / resource URI(如 window://... 或业务自定义 scheme)。
name: Option<String>资源名 / resource name。
description: Option<String>资源描述 / resource description。
mime_type: Option<String>资源 MIME 类型 / resource MIME type。
size: Option<u64>资源字节数 / resource size in bytes。
annotations: Option<ResourceAnnotations>MCP 标准 annotations / MCP standard annotations。
meta: Option<Value>A2C 扩展元数据(线字段名 _meta)/ A2C extension metadata (wire field _meta)。
Trait Implementations§
Source§impl Clone for A2CResource
impl Clone for A2CResource
Source§fn clone(&self) -> A2CResource
fn clone(&self) -> A2CResource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 A2CResource
impl Debug for A2CResource
Source§impl Default for A2CResource
impl Default for A2CResource
Source§fn default() -> A2CResource
fn default() -> A2CResource
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for A2CResource
impl<'de> Deserialize<'de> for A2CResource
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<A2CResource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<A2CResource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for A2CResource
impl PartialEq for A2CResource
Source§fn eq(&self, other: &A2CResource) -> bool
fn eq(&self, other: &A2CResource) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for A2CResource
impl Serialize for A2CResource
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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for A2CResource
Auto Trait Implementations§
impl Freeze for A2CResource
impl RefUnwindSafe for A2CResource
impl Send for A2CResource
impl Sync for A2CResource
impl Unpin for A2CResource
impl UnsafeUnpin for A2CResource
impl UnwindSafe for A2CResource
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