pub struct GetPromptParams {
pub name: String,
pub arguments: Option<HashMap<String, String>>,
pub meta: Option<HashMap<String, Value>>,
}
Expand description
Parameters for prompts/get request (matches MCP GetPromptRequest.params exactly)
Fields§
§name: String
Name of the prompt to get
arguments: Option<HashMap<String, String>>
Arguments to pass to the prompt (MCP spec: { [key: string]: string })
meta: Option<HashMap<String, Value>>
Meta information (optional _meta field inside params)
Implementations§
Source§impl GetPromptParams
impl GetPromptParams
pub fn new(name: impl Into<String>) -> GetPromptParams
pub fn with_arguments( self, arguments: HashMap<String, String>, ) -> GetPromptParams
pub fn with_meta(self, meta: HashMap<String, Value>) -> GetPromptParams
Trait Implementations§
Source§impl Clone for GetPromptParams
impl Clone for GetPromptParams
Source§fn clone(&self) -> GetPromptParams
fn clone(&self) -> GetPromptParams
Returns a duplicate of the value. Read more
1.0.0 · 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 GetPromptParams
impl Debug for GetPromptParams
Source§impl<'de> Deserialize<'de> for GetPromptParams
impl<'de> Deserialize<'de> for GetPromptParams
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetPromptParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetPromptParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl HasGetPromptParams for GetPromptParams
impl HasGetPromptParams for GetPromptParams
Source§impl HasMetaParam for GetPromptParams
impl HasMetaParam for GetPromptParams
Source§impl SerdeParamExtractor<GetPromptParams> for GetPromptParams
impl SerdeParamExtractor<GetPromptParams> for GetPromptParams
type Error = McpError
Source§fn extract_serde(
params: RequestParams,
) -> Result<GetPromptParams, <GetPromptParams as SerdeParamExtractor<GetPromptParams>>::Error>
fn extract_serde( params: RequestParams, ) -> Result<GetPromptParams, <GetPromptParams as SerdeParamExtractor<GetPromptParams>>::Error>
Extract parameters using serde deserialization
Source§impl Serialize for GetPromptParams
impl Serialize for GetPromptParams
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Params for GetPromptParams
Auto Trait Implementations§
impl Freeze for GetPromptParams
impl RefUnwindSafe for GetPromptParams
impl Send for GetPromptParams
impl Sync for GetPromptParams
impl Unpin for GetPromptParams
impl UnwindSafe for GetPromptParams
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