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<ElicitResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ElicitResult, <__D as Deserializer<'de>>::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) -> ClientResult
fn from(value: ElicitResult) -> ClientResult
Converts to this type from the input type.
Source§impl From<ElicitResult> for MessageFromClient
impl From<ElicitResult> for MessageFromClient
Source§fn from(value: ElicitResult) -> MessageFromClient
fn from(value: ElicitResult) -> MessageFromClient
Converts to this type from the input type.
Source§impl From<ElicitResult> for ResultFromClient
impl From<ElicitResult> for ResultFromClient
Source§fn from(value: ElicitResult) -> ResultFromClient
fn from(value: ElicitResult) -> ResultFromClient
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<ClientMessage, RpcError>
Source§impl Serialize for ElicitResult
impl Serialize for ElicitResult
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 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
Source§fn try_from(
value: ResultFromClient,
) -> Result<ElicitResult, <ElicitResult as TryFrom<ResultFromClient>>::Error>
fn try_from( value: ResultFromClient, ) -> Result<ElicitResult, <ElicitResult as TryFrom<ResultFromClient>>::Error>
Performs the conversion.
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