pub struct ElicitResult {
pub action: ElicitResultAction,
pub content: Option<HashMap<String, ElicitResultContentValue>>,
pub meta: Option<Map<String, Value>>,
}
Expand description
The client’s response to an elicitation request.
JSON schema
{
"description": "The client's response to an elicitation request.",
"type": "object",
"required": [
"action"
],
"properties": {
"_meta": {
"description": "See [specification/2025-06-18/basic/index#general-fields] for notes on _meta usage.",
"type": "object",
"additionalProperties": {}
},
"action": {
"description": "The user action in response to the elicitation.\n- \"accept\": User submitted the form/confirmed the action\n- \"decline\": User explicitly declined the action\n- \"cancel\": User dismissed without making an explicit choice",
"type": "string",
"enum": [
"accept",
"cancel",
"decline"
]
},
"content": {
"description": "The submitted form data, only present when action is \"accept\".\nContains values matching the requested schema.",
"type": "object",
"additionalProperties": {
"type": [
"string",
"integer",
"boolean"
]
}
}
}
}
Fields§
§action: ElicitResultAction
The user action in response to the elicitation. - “accept”: User submitted the form/confirmed the action - “decline”: User explicitly declined the action - “cancel”: User dismissed without making an explicit choice
content: Option<HashMap<String, ElicitResultContentValue>>
The submitted form data, only present when action is “accept”. Contains values matching the requested schema.
meta: Option<Map<String, Value>>
See [specification/2025-06-18/basic/index#general-fields] for notes on _meta usage.
Trait Implementations§
Source§impl Clone for ElicitResult
impl Clone for ElicitResult
Source§fn clone(&self) -> ElicitResult
fn clone(&self) -> ElicitResult
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ElicitResult
impl Debug for ElicitResult
Source§impl<'de> Deserialize<'de> for ElicitResult
impl<'de> Deserialize<'de> for ElicitResult
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<ElicitResult> for ClientResult
impl From<ElicitResult> for ClientResult
Source§fn from(value: ElicitResult) -> Self
fn from(value: ElicitResult) -> Self
Converts to this type from the input type.
Source§impl From<ElicitResult> for MessageFromClient
impl From<ElicitResult> for MessageFromClient
Source§fn from(value: ElicitResult) -> Self
fn from(value: ElicitResult) -> Self
Converts to this type from the input type.
Source§impl From<ElicitResult> for ResultFromClient
impl From<ElicitResult> for ResultFromClient
Source§fn from(value: ElicitResult) -> Self
fn from(value: ElicitResult) -> Self
Converts to this type from the input type.
Source§impl FromMessage<ElicitResult> for ClientMessage
impl FromMessage<ElicitResult> for ClientMessage
fn from_message( message: ElicitResult, request_id: Option<RequestId>, ) -> Result<Self, RpcError>
Source§impl Serialize for ElicitResult
impl Serialize for ElicitResult
Source§impl ToMessage<ClientMessage> for ElicitResult
impl ToMessage<ClientMessage> for ElicitResult
fn to_message( self, request_id: Option<RequestId>, ) -> Result<ClientMessage, RpcError>
Source§impl TryFrom<ResultFromClient> for ElicitResult
impl TryFrom<ResultFromClient> for ElicitResult
Auto Trait Implementations§
impl Freeze for ElicitResult
impl RefUnwindSafe for ElicitResult
impl Send for ElicitResult
impl Sync for ElicitResult
impl Unpin for ElicitResult
impl UnwindSafe for ElicitResult
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