#[non_exhaustive]pub enum UnexpectedMemberPolicy {
Ignore,
Warning,
Error,
}Expand description
How validate treats an observed member that the
template does not declare.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ignore
Silently accept the extra member; no issue is reported.
Warning
Report the extra member as a ValidationSeverity::Warning.
Error
Report the extra member as a ValidationSeverity::Error.
Trait Implementations§
Source§impl Clone for UnexpectedMemberPolicy
impl Clone for UnexpectedMemberPolicy
Source§fn clone(&self) -> UnexpectedMemberPolicy
fn clone(&self) -> UnexpectedMemberPolicy
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 moreimpl Copy for UnexpectedMemberPolicy
Source§impl Debug for UnexpectedMemberPolicy
impl Debug for UnexpectedMemberPolicy
impl Eq for UnexpectedMemberPolicy
Source§impl PartialEq for UnexpectedMemberPolicy
impl PartialEq for UnexpectedMemberPolicy
impl StructuralPartialEq for UnexpectedMemberPolicy
Auto Trait Implementations§
impl Freeze for UnexpectedMemberPolicy
impl RefUnwindSafe for UnexpectedMemberPolicy
impl Send for UnexpectedMemberPolicy
impl Sync for UnexpectedMemberPolicy
impl Unpin for UnexpectedMemberPolicy
impl UnsafeUnpin for UnexpectedMemberPolicy
impl UnwindSafe for UnexpectedMemberPolicy
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