pub struct UIResourceContents {
pub uri: String,
pub mime_type: String,
pub text: Option<String>,
pub blob: Option<String>,
pub meta: Option<Map<String, Value>>,
}Expand description
UI Resource contents for delivery to the host
This represents the actual content of a UI resource that can be rendered.
For HTML resources, the content is provided in the text field.
Fields§
§uri: StringThe resource URI
mime_type: StringMIME type of the content
text: Option<String>Text content (for text/html+mcp)
blob: Option<String>Binary content as base64 (for future WASM support)
meta: Option<Map<String, Value>>Optional metadata for resource content (e.g., widget description, CSP, domain)
Implementations§
Trait Implementations§
Source§impl Clone for UIResourceContents
impl Clone for UIResourceContents
Source§fn clone(&self) -> UIResourceContents
fn clone(&self) -> UIResourceContents
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 UIResourceContents
impl Debug for UIResourceContents
Source§impl<'de> Deserialize<'de> for UIResourceContents
impl<'de> Deserialize<'de> for UIResourceContents
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 UIResourceContents
Available on crate feature schema-generation only.
impl JsonSchema for UIResourceContents
Available on crate feature
schema-generation only.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 moreAuto Trait Implementations§
impl Freeze for UIResourceContents
impl RefUnwindSafe for UIResourceContents
impl Send for UIResourceContents
impl Sync for UIResourceContents
impl Unpin for UIResourceContents
impl UnsafeUnpin for UIResourceContents
impl UnwindSafe for UIResourceContents
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