pub struct McpAppResourceBuilder { /* private fields */ }Expand description
Builder for one predeclared raw-HTML MCP Apps resource.
Implementations§
Source§impl McpAppResourceBuilder
impl McpAppResourceBuilder
Sourcepub fn new(
uri: impl Into<String>,
name: impl Into<String>,
html: impl Into<String>,
) -> Result<Self, McpAppError>
pub fn new( uri: impl Into<String>, name: impl Into<String>, html: impl Into<String>, ) -> Result<Self, McpAppError>
Create a UI resource with validated URI and HTML content.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set a human-readable resource description.
Sourcepub fn metadata(self, metadata: McpUiResourceMeta) -> Self
pub fn metadata(self, metadata: McpUiResourceMeta) -> Self
Set typed UI security/rendering metadata.
Auto Trait Implementations§
impl Freeze for McpAppResourceBuilder
impl RefUnwindSafe for McpAppResourceBuilder
impl Send for McpAppResourceBuilder
impl Sync for McpAppResourceBuilder
impl Unpin for McpAppResourceBuilder
impl UnsafeUnpin for McpAppResourceBuilder
impl UnwindSafe for McpAppResourceBuilder
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