Skip to main content

McpInput

Struct McpInput 

Source
pub struct McpInput { /* private fields */ }
Expand description

Shape-owned metadata for model-controlled MCP input.

This is metadata only. Protocol handling, JSON decoding, validation, and application authorization stay in MCP integration crates.

Implementations§

Source§

impl McpInput

Source

pub const fn unsupported() -> Self

No model-controlled MCP input is supported.

Source

pub const fn any() -> Self

Accept any JSON value.

Source

pub const fn boolean() -> Self

Accept a boolean scalar.

Source

pub const fn integer() -> Self

Accept an integer scalar.

Source

pub const fn number() -> Self

Accept a number scalar.

Source

pub const fn decimal() -> Self

Accept a decimal scalar encoded as a JSON number or string.

Source

pub const fn string() -> Self

Accept a string scalar.

Source

pub const fn date() -> Self

Accept an RFC 3339 full-date string.

Source

pub const fn date_time() -> Self

Accept an RFC 3339 date-time string.

Source

pub const fn scalar(kind: McpPrimitiveKind) -> Self

Accept a scalar of the given primitive kind.

Source

pub const fn string_list() -> Self

Accept an ordered array of strings.

Source

pub const fn boolean_list() -> Self

Accept an ordered array of booleans.

Source

pub const fn integer_list() -> Self

Accept an ordered array of integers.

Source

pub const fn number_list() -> Self

Accept an ordered array of numbers.

Source

pub const fn decimal_list() -> Self

Accept an ordered array of decimals encoded as JSON numbers or strings.

Source

pub const fn date_list() -> Self

Accept an ordered array of RFC 3339 full-date strings.

Source

pub const fn date_time_list() -> Self

Accept an ordered array of RFC 3339 date-time strings.

Source

pub const fn list(items: McpPrimitiveKind) -> Self

Accept an ordered array of primitive values.

Source

pub const fn string_set() -> Self

Accept a unique array of strings.

Source

pub const fn boolean_set() -> Self

Accept a unique array of booleans.

Source

pub const fn integer_set() -> Self

Accept a unique array of integers.

Source

pub const fn number_set() -> Self

Accept a unique array of numbers.

Source

pub const fn decimal_set() -> Self

Accept a unique array of decimals encoded as JSON numbers or strings.

Source

pub const fn date_set() -> Self

Accept a unique array of RFC 3339 full-date strings.

Source

pub const fn date_time_set() -> Self

Accept a unique array of RFC 3339 date-time strings.

Source

pub const fn set(items: McpPrimitiveKind) -> Self

Accept a unique array of primitive values.

Source

pub const fn decimal_range() -> Self

Accept a decimal { "min": ..., "max": ... } range object.

Source

pub const fn integer_range() -> Self

Accept an integer { "min": ..., "max": ... } range object.

Source

pub const fn number_range() -> Self

Accept a number { "min": ..., "max": ... } range object.

Source

pub const fn date_range() -> Self

Accept a date { "min": ..., "max": ... } range object.

Source

pub const fn date_time_range() -> Self

Accept a date-time { "min": ..., "max": ... } range object.

Source

pub const fn range(bound: McpRangeBoundKind) -> Self

Accept a { "min": ..., "max": ... } range object of the given kind.

Source

pub const fn object() -> Self

Accept an object with integration-defined structure.

Source

pub const fn input_shape(self) -> McpInputShape

Return the structured input shape exposed to MCP integrations.

Source

pub const fn supported(self) -> bool

Whether this metadata describes any supported input shape.

Trait Implementations§

Source§

impl Clone for McpInput

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for McpInput

Source§

impl Debug for McpInput

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for McpInput

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for McpInput

Source§

impl PartialEq for McpInput

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for McpInput

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.