pub struct CompleteResult {
pub completion: CompleteResultCompletion,
pub meta: Option<ResultMetaObject>,
pub result_type: String,
}Expand description
Latest MCP Protocol 2026_07_28 The result returned by the server for a {@link CompleteRequestcompletion/complete} request.
JSON schema
{
"description": "The result returned by the server for a {@link CompleteRequestcompletion/complete} request.",
"type": "object",
"required": [
"completion",
"resultType"
],
"properties": {
"_meta": {
"$ref": "#/$defs/ResultMetaObject"
},
"completion": {
"type": "object",
"required": [
"values"
],
"properties": {
"hasMore": {
"description": "Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.",
"type": "boolean"
},
"total": {
"description": "The total number of completion options available. This can exceed the number of values actually sent in the response.",
"type": "integer"
},
"values": {
"description": "An array of completion values. Must not exceed 100 items.",
"type": "array",
"items": {
"type": "string"
},
"maxItems": 100
}
}
},
"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"
}
}
}Fields§
§completion: CompleteResultCompletion§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”.
Trait Implementations§
Source§impl Clone for CompleteResult
impl Clone for CompleteResult
Source§fn clone(&self) -> CompleteResult
fn clone(&self) -> CompleteResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CompleteResult
impl Debug for CompleteResult
Source§impl<'de> Deserialize<'de> for CompleteResult
impl<'de> Deserialize<'de> for CompleteResult
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<CompleteResult> for ServerResult
impl From<CompleteResult> for ServerResult
Source§fn from(value: CompleteResult) -> Self
fn from(value: CompleteResult) -> Self
Converts to this type from the input type.
Source§impl From<CompleteResult> for GenericResult
impl From<CompleteResult> for GenericResult
Source§fn from(value: CompleteResult) -> Self
fn from(value: CompleteResult) -> Self
Converts to this type from the input type.
Source§impl From<CompleteResult> for MessageFromServer
impl From<CompleteResult> for MessageFromServer
Source§fn from(value: CompleteResult) -> Self
fn from(value: CompleteResult) -> Self
Converts to this type from the input type.
Source§impl Serialize for CompleteResult
impl Serialize for CompleteResult
Source§impl TryFrom<ServerResult> for CompleteResult
impl TryFrom<ServerResult> for CompleteResult
Auto Trait Implementations§
impl Freeze for CompleteResult
impl RefUnwindSafe for CompleteResult
impl Send for CompleteResult
impl Sync for CompleteResult
impl Unpin for CompleteResult
impl UnsafeUnpin for CompleteResult
impl UnwindSafe for CompleteResult
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