pub struct GetPromptResult {
pub description: Option<String>,
pub messages: Vec<PromptMessage>,
pub meta: Option<Map<String, Value>>,
}
Expand description
The server’s response to a prompts/get request from the client.
JSON schema
{
"description": "The server's response to a prompts/get request from the client.",
"type": "object",
"required": [
"messages"
],
"properties": {
"_meta": {
"description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
"type": "object",
"additionalProperties": {}
},
"description": {
"description": "An optional description for the prompt.",
"type": "string"
},
"messages": {
"type": "array",
"items": {
"$ref": "#/definitions/PromptMessage"
}
}
}
}
Fields§
§description: Option<String>
An optional description for the prompt.
messages: Vec<PromptMessage>
§meta: Option<Map<String, Value>>
This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
Trait Implementations§
Source§impl Clone for GetPromptResult
impl Clone for GetPromptResult
Source§fn clone(&self) -> GetPromptResult
fn clone(&self) -> GetPromptResult
Returns a copy 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 GetPromptResult
impl Debug for GetPromptResult
Source§impl<'de> Deserialize<'de> for GetPromptResult
impl<'de> Deserialize<'de> for GetPromptResult
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<GetPromptResult> for MessageFromServer
impl From<GetPromptResult> for MessageFromServer
Source§fn from(value: GetPromptResult) -> Self
fn from(value: GetPromptResult) -> Self
Converts to this type from the input type.
Source§impl From<GetPromptResult> for ResultFromServer
impl From<GetPromptResult> for ResultFromServer
Source§fn from(value: GetPromptResult) -> Self
fn from(value: GetPromptResult) -> Self
Converts to this type from the input type.
Source§impl From<GetPromptResult> for ServerResult
impl From<GetPromptResult> for ServerResult
Source§fn from(value: GetPromptResult) -> Self
fn from(value: GetPromptResult) -> Self
Converts to this type from the input type.
Source§impl FromMessage<GetPromptResult> for ServerMessage
impl FromMessage<GetPromptResult> for ServerMessage
fn from_message( message: GetPromptResult, request_id: Option<RequestId>, ) -> Result<Self, JsonrpcErrorError>
Source§impl Serialize for GetPromptResult
impl Serialize for GetPromptResult
Source§impl ToMessage<ServerMessage> for GetPromptResult
impl ToMessage<ServerMessage> for GetPromptResult
fn to_message( self, request_id: Option<RequestId>, ) -> Result<ServerMessage, JsonrpcErrorError>
Source§impl TryFrom<ResultFromServer> for GetPromptResult
impl TryFrom<ResultFromServer> for GetPromptResult
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for GetPromptResult
impl RefUnwindSafe for GetPromptResult
impl Send for GetPromptResult
impl Sync for GetPromptResult
impl Unpin for GetPromptResult
impl UnwindSafe for GetPromptResult
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