pub struct McpValidationIssue { /* private fields */ }Expand description
Structured validation failure returned in MCP error details and snapshots.
Implementations§
Source§impl McpValidationIssue
impl McpValidationIssue
Sourcepub fn form(message: impl Into<String>) -> Self
pub fn form(message: impl Into<String>) -> Self
Build a form-scoped issue when no field-specific metadata is available.
Sourcepub fn custom(scope: McpValidationScope, message: impl Into<String>) -> Self
pub fn custom(scope: McpValidationScope, message: impl Into<String>) -> Self
Build a generic issue for integrations that already have structured metadata.
Sourcepub fn for_rule(
field: impl AsRef<str>,
rule: McpValidationRule,
message: impl Into<String>,
) -> Self
pub fn for_rule( field: impl AsRef<str>, rule: McpValidationRule, message: impl Into<String>, ) -> Self
Build an issue from a static validation rule descriptor.
Sourcepub fn for_filter_rule(
filter: impl Into<String>,
rule: McpValidationRule,
message: impl Into<String>,
) -> Self
pub fn for_filter_rule( filter: impl Into<String>, rule: McpValidationRule, message: impl Into<String>, ) -> Self
Build a table-filter issue from a static validation rule descriptor.
Sourcepub fn with_element_index(self, element_index: usize) -> Self
pub fn with_element_index(self, element_index: usize) -> Self
Attach the failing collection element index to an element issue.
Sourcepub fn with_field(self, field: impl AsRef<str>) -> Self
pub fn with_field(self, field: impl AsRef<str>) -> Self
Attach a field name to an issue.
Sourcepub fn with_filter(self, filter: impl Into<String>) -> Self
pub fn with_filter(self, filter: impl Into<String>) -> Self
Attach a table filter name to an issue.
Sourcepub fn with_validator(self, validator: impl Into<String>) -> Self
pub fn with_validator(self, validator: impl Into<String>) -> Self
Attach a validator name to a generic issue.
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Attach a source label to a generic issue.
Trait Implementations§
Source§impl Clone for McpValidationIssue
impl Clone for McpValidationIssue
Source§impl Debug for McpValidationIssue
impl Debug for McpValidationIssue
impl Eq for McpValidationIssue
Source§impl PartialEq for McpValidationIssue
impl PartialEq for McpValidationIssue
impl StructuralPartialEq for McpValidationIssue
Auto Trait Implementations§
impl Freeze for McpValidationIssue
impl RefUnwindSafe for McpValidationIssue
impl Send for McpValidationIssue
impl Sync for McpValidationIssue
impl Unpin for McpValidationIssue
impl UnsafeUnpin for McpValidationIssue
impl UnwindSafe for McpValidationIssue
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
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§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.