pub struct McpValidationParam { /* private fields */ }Expand description
One builder argument captured from a generated validator chain.
Implementations§
Source§impl McpValidationParam
impl McpValidationParam
Sourcepub const fn literal(name: &'static str, literal: &'static str) -> Self
pub const fn literal(name: &'static str, literal: &'static str) -> Self
Record a literal argument value that can be reflected into schemas.
Sourcepub const fn expr(name: &'static str, expr: &'static str) -> Self
pub const fn expr(name: &'static str, expr: &'static str) -> Self
Record a non-literal expression for tool clients to display or inspect.
Sourcepub const fn literal_value(self) -> Option<&'static str>
pub const fn literal_value(self) -> Option<&'static str>
Literal argument value, when the derive could statically identify one.
Sourcepub const fn expr_value(self) -> Option<&'static str>
pub const fn expr_value(self) -> Option<&'static str>
Non-literal argument expression, when no literal value is available.
pub fn to_value(self) -> Value
Trait Implementations§
Source§impl Clone for McpValidationParam
impl Clone for McpValidationParam
impl Copy for McpValidationParam
Source§impl Debug for McpValidationParam
impl Debug for McpValidationParam
impl Eq for McpValidationParam
Source§impl PartialEq for McpValidationParam
impl PartialEq for McpValidationParam
impl StructuralPartialEq for McpValidationParam
Auto Trait Implementations§
impl Freeze for McpValidationParam
impl RefUnwindSafe for McpValidationParam
impl Send for McpValidationParam
impl Sync for McpValidationParam
impl Unpin for McpValidationParam
impl UnsafeUnpin for McpValidationParam
impl UnwindSafe for McpValidationParam
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.