pub struct MaterializeError(pub ValidationResult);Expand description
A freshly-read node could not be made to conform to a Schema –
raised by crate::materialize::materialize (issue #14), mirroring
Python’s ParseError(str(res), errors=res.errors) raised by
~/dev/omnist/omnist/deserialize.py. Wraps a
crate::schema::ValidationResult directly rather than duplicating its
(path, message, code) collection machinery – materialize already
walks the tree using the exact same shape-check rules Schema::validate
does, so its error report reuses the same collector type.
Tuple Fields§
§0: ValidationResultImplementations§
Source§impl MaterializeError
impl MaterializeError
Sourcepub fn new(result: ValidationResult) -> Self
pub fn new(result: ValidationResult) -> Self
Construct a new MaterializeError wrapping a ValidationResult.
Sourcepub fn result(&self) -> &ValidationResult
pub fn result(&self) -> &ValidationResult
Access the inner ValidationResult.
Sourcepub fn errors(&self) -> &[ValidationError]
pub fn errors(&self) -> &[ValidationError]
Slice of all validation errors that caused materialization to fail.
Trait Implementations§
Source§impl Clone for MaterializeError
impl Clone for MaterializeError
Source§fn clone(&self) -> MaterializeError
fn clone(&self) -> MaterializeError
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 MaterializeError
impl Debug for MaterializeError
Source§impl Display for MaterializeError
impl Display for MaterializeError
impl Eq for MaterializeError
Source§impl Error for MaterializeError
impl Error for MaterializeError
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 From<MaterializeError> for OmnistError
impl From<MaterializeError> for OmnistError
Source§fn from(source: MaterializeError) -> Self
fn from(source: MaterializeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MaterializeError
impl PartialEq for MaterializeError
Source§fn eq(&self, other: &MaterializeError) -> bool
fn eq(&self, other: &MaterializeError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MaterializeError
Auto Trait Implementations§
impl Freeze for MaterializeError
impl RefUnwindSafe for MaterializeError
impl Send for MaterializeError
impl Sync for MaterializeError
impl Unpin for MaterializeError
impl UnsafeUnpin for MaterializeError
impl UnwindSafe for MaterializeError
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more