pub struct MrtrInputResponse { /* private fields */ }Expand description
A typed input response whose value can be accepted only for the matching
MrtrInputKind recorded at issuance time.
Implementations§
Source§impl MrtrInputResponse
impl MrtrInputResponse
Sourcepub fn elicitation(value: ElicitResult) -> McpResult<Self>
pub fn elicitation(value: ElicitResult) -> McpResult<Self>
Creates an elicitation response value.
§Errors
Returns an internal error only if its protocol value cannot be represented as JSON.
Sourcepub fn sampling(value: FinalCreateMessageResult) -> McpResult<Self>
pub fn sampling(value: FinalCreateMessageResult) -> McpResult<Self>
Creates a sampling response value.
§Errors
Returns an internal error only if its protocol value cannot be represented as JSON.
Sourcepub fn roots(value: ListRootsResult) -> McpResult<Self>
pub fn roots(value: ListRootsResult) -> McpResult<Self>
Creates a roots response value.
§Errors
Returns an internal error only if its protocol value cannot be represented as JSON.
Sourcepub const fn kind(&self) -> MrtrInputKind
pub const fn kind(&self) -> MrtrInputKind
Returns the response’s exact kind.
Sourcepub fn elicitation_result(&self) -> McpResult<ElicitResult>
pub fn elicitation_result(&self) -> McpResult<ElicitResult>
Returns this value as the elicitation result it was admitted as.
§Errors
Returns InvalidParams when the caller asks for the wrong response
kind. This is a handler-facing resume surface, not a wire decoder.
Sourcepub fn sampling_result(&self) -> McpResult<FinalCreateMessageResult>
pub fn sampling_result(&self) -> McpResult<FinalCreateMessageResult>
Returns this value as the sampling result it was admitted as.
Sourcepub fn roots_result(&self) -> McpResult<ListRootsResult>
pub fn roots_result(&self) -> McpResult<ListRootsResult>
Returns this value as the roots result it was admitted as.
Trait Implementations§
Source§impl Clone for MrtrInputResponse
impl Clone for MrtrInputResponse
Source§fn clone(&self) -> MrtrInputResponse
fn clone(&self) -> MrtrInputResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more