pub struct ResourceLink {
pub uri: String,
pub mime_type: Option<String>,
pub text: Option<String>,
pub meta: Option<Value>,
}Expand description
MCP resource reference. Mirrors the shape an MCP server returns under
tools/call’s content[].resource, plus the _meta blob that hosts use
to discover MCP-Apps UI capabilities (_meta.ui.resourceUri).
Fields§
§uri: StringResource URI (e.g. ui://zippy/new/<id> for MCP-Apps).
mime_type: Option<String>MIME type the server claims for this resource. MCP-Apps hosts look
for text/html;profile=mcp-app to decide whether to iframe it.
text: Option<String>Optional text fallback to show to users / models when the host can’t render the resource (e.g. CLI clients).
meta: Option<Value>Server-supplied _meta object. Hosts inspect _meta.ui.resourceUri
- sizing hints here without us having to model every MCP extension.
Trait Implementations§
Source§impl Clone for ResourceLink
impl Clone for ResourceLink
Source§fn clone(&self) -> ResourceLink
fn clone(&self) -> ResourceLink
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 ResourceLink
impl Debug for ResourceLink
Source§impl<'de> Deserialize<'de> for ResourceLink
impl<'de> Deserialize<'de> for ResourceLink
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ResourceLink
impl JsonSchema for ResourceLink
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ResourceLink
impl PartialEq for ResourceLink
Source§fn eq(&self, other: &ResourceLink) -> bool
fn eq(&self, other: &ResourceLink) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ResourceLink
impl Serialize for ResourceLink
impl StructuralPartialEq for ResourceLink
Auto Trait Implementations§
impl Freeze for ResourceLink
impl RefUnwindSafe for ResourceLink
impl Send for ResourceLink
impl Sync for ResourceLink
impl Unpin for ResourceLink
impl UnsafeUnpin for ResourceLink
impl UnwindSafe for ResourceLink
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