pub struct McpResourceBuilder { /* private fields */ }Expand description
Sub-builder for a single MCP resource. Call and to return to
the parent McpMockBuilder.
Implementations§
Source§impl McpResourceBuilder
impl McpResourceBuilder
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set the resource description.
Sourcepub fn with_mime_type(self, mime_type: impl Into<String>) -> Self
pub fn with_mime_type(self, mime_type: impl Into<String>) -> Self
Set the MIME type (default application/json).
Sourcepub fn with_content(self, content: impl Into<String>) -> Self
pub fn with_content(self, content: impl Into<String>) -> Self
Set the resource content returned by resources/read.
Sourcepub fn and(self) -> McpMockBuilder
pub fn and(self) -> McpMockBuilder
Finish this resource and return to the parent builder.
Auto Trait Implementations§
impl Freeze for McpResourceBuilder
impl RefUnwindSafe for McpResourceBuilder
impl Send for McpResourceBuilder
impl Sync for McpResourceBuilder
impl Unpin for McpResourceBuilder
impl UnsafeUnpin for McpResourceBuilder
impl UnwindSafe for McpResourceBuilder
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