#[non_exhaustive]pub enum SamplingContent {
Text {
text: String,
},
}Expand description
Discriminated content payload for a SamplingMessage or
SamplingResponse. Serialised with {"type":"<variant>", ...}
per the MCP wire format.
Only the text variant is implemented in this cluster. An
incoming blob tagged "image", "audio", or "resource" will
fail to deserialise with serde’s “unknown variant” error, which
the call site surfaces as an unsupported-content failure. See
ADR-027 for the scope decision.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
Source§impl Clone for SamplingContent
impl Clone for SamplingContent
Source§fn clone(&self) -> SamplingContent
fn clone(&self) -> SamplingContent
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 SamplingContent
impl Debug for SamplingContent
Source§impl<'de> Deserialize<'de> for SamplingContent
impl<'de> Deserialize<'de> for SamplingContent
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 SamplingContent
impl RefUnwindSafe for SamplingContent
impl Send for SamplingContent
impl Sync for SamplingContent
impl Unpin for SamplingContent
impl UnsafeUnpin for SamplingContent
impl UnwindSafe for SamplingContent
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