pub struct McpSamplingExecutionResult {
pub action: McpSamplingExecutionAction,
pub error: Option<String>,
pub result: Option<McpExecuteSamplingResult>,
}Expand description
Outcome of an MCP sampling execution: success result, failure error, or cancellation.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§action: McpSamplingExecutionActionOutcome of the sampling inference. ‘success’ produced a response; ‘failure’ encountered an error (including agent-side rejection by content filter or criteria); ‘cancelled’ the caller cancelled this execution via cancelSamplingExecution.
error: Option<String>Error description, present when action=‘failure’.
result: Option<McpExecuteSamplingResult>MCP CreateMessageResult payload (with optional ‘tools’ extension), present when action=‘success’. Treated as opaque at the schema layer; consumers should construct/consume it per the MCP CreateMessageResult shape.
Trait Implementations§
Source§impl Clone for McpSamplingExecutionResult
impl Clone for McpSamplingExecutionResult
Source§fn clone(&self) -> McpSamplingExecutionResult
fn clone(&self) -> McpSamplingExecutionResult
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 McpSamplingExecutionResult
impl Debug for McpSamplingExecutionResult
Source§impl Default for McpSamplingExecutionResult
impl Default for McpSamplingExecutionResult
Source§fn default() -> McpSamplingExecutionResult
fn default() -> McpSamplingExecutionResult
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for McpSamplingExecutionResult
impl<'de> Deserialize<'de> for McpSamplingExecutionResult
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
Auto Trait Implementations§
impl Freeze for McpSamplingExecutionResult
impl RefUnwindSafe for McpSamplingExecutionResult
impl Send for McpSamplingExecutionResult
impl Sync for McpSamplingExecutionResult
impl Unpin for McpSamplingExecutionResult
impl UnsafeUnpin for McpSamplingExecutionResult
impl UnwindSafe for McpSamplingExecutionResult
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