pub struct MetadataValidationError { /* private fields */ }Expand description
Aggregate error returned by schema-level validation APIs.
Unlike single-entry metadata accessors, schema validation can discover
multiple independent issues in one pass. This type preserves all collected
MetadataError values so callers can report or fix them together.
Implementations§
Source§impl MetadataValidationError
impl MetadataValidationError
Sourcepub fn from_issue(issue: MetadataError) -> Self
pub fn from_issue(issue: MetadataError) -> Self
Creates an aggregate validation error from one issue.
Sourcepub fn from_issues(issues: Vec<MetadataError>) -> Option<Self>
pub fn from_issues(issues: Vec<MetadataError>) -> Option<Self>
Creates an aggregate validation error from a non-empty issue list.
Returns None when issues is empty because an empty validation error
has no actionable meaning.
Sourcepub fn issues(&self) -> &[MetadataError]
pub fn issues(&self) -> &[MetadataError]
Returns the collected validation issues.
Sourcepub fn into_issues(self) -> Vec<MetadataError>
pub fn into_issues(self) -> Vec<MetadataError>
Converts this aggregate error into its collected issues.
Trait Implementations§
Source§impl Clone for MetadataValidationError
impl Clone for MetadataValidationError
Source§fn clone(&self) -> MetadataValidationError
fn clone(&self) -> MetadataValidationError
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 MetadataValidationError
impl Debug for MetadataValidationError
Source§impl Display for MetadataValidationError
impl Display for MetadataValidationError
Source§impl Error for MetadataValidationError
impl Error for MetadataValidationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for MetadataValidationError
impl PartialEq for MetadataValidationError
Source§fn eq(&self, other: &MetadataValidationError) -> bool
fn eq(&self, other: &MetadataValidationError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MetadataValidationError
impl StructuralPartialEq for MetadataValidationError
Auto Trait Implementations§
impl Freeze for MetadataValidationError
impl RefUnwindSafe for MetadataValidationError
impl Send for MetadataValidationError
impl Sync for MetadataValidationError
impl Unpin for MetadataValidationError
impl UnsafeUnpin for MetadataValidationError
impl UnwindSafe for MetadataValidationError
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<T> IntoValueDefault<T> for T
impl<T> IntoValueDefault<T> for T
Source§fn into_value_default(self) -> T
fn into_value_default(self) -> T
Converts this argument into the default value.