pub enum MifSchemaError {
SchemaCompilation(SchemaCompilationSource),
Invalid(Vec<String>),
}Expand description
Error validating a MIF document or citation against the canonical schema.
Variants§
SchemaCompilation(SchemaCompilationSource)
The vendored schema itself failed to compile. Indicates a bug in this crate’s vendored schema files, not a problem with the instance being validated.
Invalid(Vec<String>)
The instance failed schema validation.
Implementations§
Source§impl MifSchemaError
impl MifSchemaError
Sourcepub fn messages(&self) -> &[String]
pub fn messages(&self) -> &[String]
The individual validation error messages, if this is an
MifSchemaError::Invalid. Empty for MifSchemaError::SchemaCompilation.
Trait Implementations§
Source§impl Debug for MifSchemaError
impl Debug for MifSchemaError
Source§impl Display for MifSchemaError
impl Display for MifSchemaError
Source§impl Error for MifSchemaError
impl Error for MifSchemaError
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 ToProblem for MifSchemaError
impl ToProblem for MifSchemaError
Source§fn to_problem(&self) -> ProblemDetails
fn to_problem(&self) -> ProblemDetails
Maps
self to a fully-populated ProblemDetails envelope.Source§fn render(&self, format: OutputFormat) -> String
fn render(&self, format: OutputFormat) -> String
Auto Trait Implementations§
impl Freeze for MifSchemaError
impl RefUnwindSafe for MifSchemaError
impl Send for MifSchemaError
impl Sync for MifSchemaError
impl Unpin for MifSchemaError
impl UnsafeUnpin for MifSchemaError
impl UnwindSafe for MifSchemaError
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