pub enum MifSchemaError {
SchemaCompilation(String),
Invalid(Vec<String>),
}Expand description
Error validating a MIF document or citation against the canonical schema.
Variants§
SchemaCompilation(String)
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 Clone for MifSchemaError
impl Clone for MifSchemaError
Source§fn clone(&self) -> MifSchemaError
fn clone(&self) -> MifSchemaError
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 MifSchemaError
impl Debug for MifSchemaError
Source§impl Display for MifSchemaError
impl Display for MifSchemaError
Source§impl Error for MifSchemaError
impl Error for MifSchemaError
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()
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