pub struct PromptsClient { /* private fields */ }Expand description
MCP Prompts client for managing and rendering prompts.
Implementations§
Source§impl PromptsClient
impl PromptsClient
Sourcepub async fn list(&self) -> Result<PromptListResult>
pub async fn list(&self) -> Result<PromptListResult>
List all available prompts.
In a full implementation, this would call prompts/list on the MCP server.
Sourcepub async fn get(
&self,
name: &str,
arguments: HashMap<String, String>,
) -> Result<GetPromptResult>
pub async fn get( &self, name: &str, arguments: HashMap<String, String>, ) -> Result<GetPromptResult>
Get a rendered prompt with arguments.
In a full implementation, this would call prompts/get on the MCP server.
Sourcepub fn register_with_renderer<F>(&self, prompt: Prompt, renderer: F)
pub fn register_with_renderer<F>(&self, prompt: Prompt, renderer: F)
Register a prompt with a custom renderer.
Sourcepub fn get_definition(&self, name: &str) -> Option<Prompt>
pub fn get_definition(&self, name: &str) -> Option<Prompt>
Get a prompt definition by name.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PromptsClient
impl RefUnwindSafe for PromptsClient
impl Send for PromptsClient
impl Sync for PromptsClient
impl Unpin for PromptsClient
impl UnsafeUnpin for PromptsClient
impl UnwindSafe for PromptsClient
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request