pub struct McpPromptBuilder { /* private fields */ }Expand description
Sub-builder for a single MCP prompt. Call and to return to the
parent McpMockBuilder.
Implementations§
Source§impl McpPromptBuilder
impl McpPromptBuilder
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set the prompt description.
Sourcepub fn with_argument(
self,
name: impl Into<String>,
description: Option<String>,
required: bool,
) -> Self
pub fn with_argument( self, name: impl Into<String>, description: Option<String>, required: bool, ) -> Self
Add a prompt argument descriptor.
Sourcepub fn responding_with(
self,
role: impl Into<String>,
text_content: impl Into<String>,
) -> Self
pub fn responding_with( self, role: impl Into<String>, text_content: impl Into<String>, ) -> Self
Add a message returned by prompts/get (use a Role value for role).
Sourcepub fn and(self) -> McpMockBuilder
pub fn and(self) -> McpMockBuilder
Finish this prompt and return to the parent builder.
Auto Trait Implementations§
impl Freeze for McpPromptBuilder
impl RefUnwindSafe for McpPromptBuilder
impl Send for McpPromptBuilder
impl Sync for McpPromptBuilder
impl Unpin for McpPromptBuilder
impl UnsafeUnpin for McpPromptBuilder
impl UnwindSafe for McpPromptBuilder
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