pub struct Result {
pub meta: Option<ResultMetaObject>,
pub result_type: String,
pub extra: Option<Map<String, Value>>,
}Expand description
Common result fields.
JSON schema
{
"description": "Common result fields.",
"type": "object",
"required": [
"resultType"
],
"properties": {
"_meta": {
"$ref": "#/$defs/ResultMetaObject"
},
"resultType": {
"description": "Indicates the type of the result, which allows the client to determine\nhow to parse the result object.\n\nServers implementing this protocol version MUST include this field.\nFor backward compatibility, when a client receives a result from a\nserver implementing an earlier protocol version (which does not include\nresultType), the client MUST treat the absent field as \"complete\".",
"type": "string"
}
},
"additionalProperties": {}
}Fields§
§meta: Option<ResultMetaObject>§result_type: StringIndicates the type of the result, which allows the client to determine how to parse the result object. Servers implementing this protocol version MUST include this field. For backward compatibility, when a client receives a result from a server implementing an earlier protocol version (which does not include resultType), the client MUST treat the absent field as “complete”.
extra: Option<Map<String, Value>>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Result
impl<'de> Deserialize<'de> for Result
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Result, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Result, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CallToolResult> for Result
impl From<CallToolResult> for Result
Source§fn from(value: CallToolResult) -> Result
fn from(value: CallToolResult) -> Result
Converts to this type from the input type.
Source§impl From<CompleteResult> for Result
impl From<CompleteResult> for Result
Source§fn from(value: CompleteResult) -> Result
fn from(value: CompleteResult) -> Result
Converts to this type from the input type.
Source§impl From<DiscoverResult> for Result
impl From<DiscoverResult> for Result
Source§fn from(value: DiscoverResult) -> Result
fn from(value: DiscoverResult) -> Result
Converts to this type from the input type.
Source§impl From<GetPromptResult> for Result
impl From<GetPromptResult> for Result
Source§fn from(value: GetPromptResult) -> Result
fn from(value: GetPromptResult) -> Result
Converts to this type from the input type.
Source§impl From<InputRequiredResult> for Result
impl From<InputRequiredResult> for Result
Source§fn from(value: InputRequiredResult) -> Result
fn from(value: InputRequiredResult) -> Result
Converts to this type from the input type.
Source§impl From<ListPromptsResult> for Result
impl From<ListPromptsResult> for Result
Source§fn from(value: ListPromptsResult) -> Result
fn from(value: ListPromptsResult) -> Result
Converts to this type from the input type.
Source§impl From<ListResourceTemplatesResult> for Result
impl From<ListResourceTemplatesResult> for Result
Source§fn from(value: ListResourceTemplatesResult) -> Result
fn from(value: ListResourceTemplatesResult) -> Result
Converts to this type from the input type.
Source§impl From<ListResourcesResult> for Result
impl From<ListResourcesResult> for Result
Source§fn from(value: ListResourcesResult) -> Result
fn from(value: ListResourcesResult) -> Result
Converts to this type from the input type.
Source§impl From<ListToolsResult> for Result
impl From<ListToolsResult> for Result
Source§fn from(value: ListToolsResult) -> Result
fn from(value: ListToolsResult) -> Result
Converts to this type from the input type.
Source§impl From<ReadResourceResult> for Result
impl From<ReadResourceResult> for Result
Source§fn from(value: ReadResourceResult) -> Result
fn from(value: ReadResourceResult) -> Result
Converts to this type from the input type.
Source§impl From<Result> for ServerResult
impl From<Result> for ServerResult
Source§fn from(value: Result) -> ServerResult
fn from(value: Result) -> ServerResult
Converts to this type from the input type.
Source§impl From<Result> for ResultFromClient
impl From<Result> for ResultFromClient
Source§fn from(value: Result) -> ResultFromClient
fn from(value: Result) -> ResultFromClient
Converts to this type from the input type.
Source§impl From<Result> for MessageFromClient
impl From<Result> for MessageFromClient
Source§fn from(value: Result) -> MessageFromClient
fn from(value: Result) -> MessageFromClient
Converts to this type from the input type.
Source§impl From<Result> for MessageFromServer
impl From<Result> for MessageFromServer
Source§fn from(value: Result) -> MessageFromServer
fn from(value: Result) -> MessageFromServer
Converts to this type from the input type.
Source§impl From<SubscriptionsListenResult> for Result
impl From<SubscriptionsListenResult> for Result
Source§fn from(value: SubscriptionsListenResult) -> Result
fn from(value: SubscriptionsListenResult) -> Result
Converts to this type from the input type.
Source§impl Serialize for Result
impl Serialize for Result
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
Source§impl TryFrom<ResultFromClient> for Result
impl TryFrom<ResultFromClient> for Result
Auto Trait Implementations§
impl Freeze for Result
impl RefUnwindSafe for Result
impl Send for Result
impl Sync for Result
impl Unpin for Result
impl UnsafeUnpin for Result
impl UnwindSafe for Result
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