pub struct GetPromptRequest {
pub id: RequestId,
pub params: GetPromptRequestParams,
/* private fields */
}Expand description
Used by the client to get a prompt provided by the server.
JSON schema
{
"description": "Used by the client to get a prompt provided by the server.",
"type": "object",
"required": [
"id",
"jsonrpc",
"method",
"params"
],
"properties": {
"id": {
"$ref": "#/$defs/RequestId"
},
"jsonrpc": {
"type": "string",
"const": "2.0"
},
"method": {
"type": "string",
"const": "prompts/get"
},
"params": {
"$ref": "#/$defs/GetPromptRequestParams"
}
}
}Fields§
§id: RequestId§params: GetPromptRequestParamsImplementations§
Source§impl GetPromptRequest
impl GetPromptRequest
pub fn new(id: RequestId, params: GetPromptRequestParams) -> Self
pub fn jsonrpc(&self) -> &String
pub fn method(&self) -> &String
Sourcepub fn method_value() -> &'static str
pub fn method_value() -> &'static str
returns “prompts/get”
pub fn method_name() -> &'static str
👎Deprecated since 0.8.0: Use
method_value() instead.Trait Implementations§
Source§impl Clone for GetPromptRequest
impl Clone for GetPromptRequest
Source§fn clone(&self) -> GetPromptRequest
fn clone(&self) -> GetPromptRequest
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 GetPromptRequest
impl Debug for GetPromptRequest
Source§impl<'de> Deserialize<'de> for GetPromptRequest
impl<'de> Deserialize<'de> for GetPromptRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<GetPromptRequest> for ClientRequest
impl From<GetPromptRequest> for ClientRequest
Source§fn from(value: GetPromptRequest) -> Self
fn from(value: GetPromptRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GetPromptRequest
impl RefUnwindSafe for GetPromptRequest
impl Send for GetPromptRequest
impl Sync for GetPromptRequest
impl Unpin for GetPromptRequest
impl UnwindSafe for GetPromptRequest
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