pub struct McpCreateElicitationResult {
pub action: ElicitationAction,
pub content: Option<Value>,
pub meta: Option<Meta>,
}Expand description
Re-exports of the rmcp wire-protocol types this crate now surfaces directly instead of wrapping. Pull these in to pattern-match on tool annotations, content blocks, structured tool output, embedded resources, sampling / elicitation requests, progress and log notifications, etc. The result returned by a client in response to an elicitation request.
Contains the user’s decision (accept/decline/cancel) and optionally their input data if they chose to accept the request.
Fields§
§action: ElicitationActionThe user’s decision on how to handle the elicitation request
content: Option<Value>The actual data provided by the user, if they accepted the request. Must conform to the JSON schema specified in the original request. Only present when action is Accept.
meta: Option<Meta>Optional protocol-level metadata for this result.
Implementations§
Source§impl CreateElicitationResult
impl CreateElicitationResult
Sourcepub fn new(action: ElicitationAction) -> CreateElicitationResult
pub fn new(action: ElicitationAction) -> CreateElicitationResult
Create a new CreateElicitationResult.
Sourcepub fn with_content(self, content: Value) -> CreateElicitationResult
pub fn with_content(self, content: Value) -> CreateElicitationResult
Set the content on this result.
Sourcepub fn with_meta(self, meta: Meta) -> CreateElicitationResult
pub fn with_meta(self, meta: Meta) -> CreateElicitationResult
Set the metadata on this result.
Trait Implementations§
Source§impl Clone for CreateElicitationResult
impl Clone for CreateElicitationResult
Source§fn clone(&self) -> CreateElicitationResult
fn clone(&self) -> CreateElicitationResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateElicitationResult
impl Debug for CreateElicitationResult
Source§impl<'de> Deserialize<'de> for CreateElicitationResult
impl<'de> Deserialize<'de> for CreateElicitationResult
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateElicitationResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateElicitationResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for CreateElicitationResult
impl PartialEq for CreateElicitationResult
Source§fn eq(&self, other: &CreateElicitationResult) -> bool
fn eq(&self, other: &CreateElicitationResult) -> bool
self and other values to be equal, and is used by ==.