#[non_exhaustive]pub enum ViolationCode {
Required,
InvalidType,
UnsupportedMediaType,
}Expand description
What is wrong with a field, as a Violation reports it.
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.
Required
A required field did not arrive: a scalar or upload was absent, an array had no elements, or a nested group received none of its fields.
InvalidType
The value does not convert to the field’s type, is not valid UTF-8, has an unsupported character set, or is a file where text is declared or the reverse.
UnsupportedMediaType
The upload’s declared media type is not one its field accepts.
Implementations§
Trait Implementations§
Source§impl Clone for ViolationCode
impl Clone for ViolationCode
impl Copy for ViolationCode
Source§impl Debug for ViolationCode
impl Debug for ViolationCode
Source§impl Display for ViolationCode
impl Display for ViolationCode
impl Eq for ViolationCode
Source§impl Hash for ViolationCode
impl Hash for ViolationCode
Source§impl PartialEq for ViolationCode
impl PartialEq for ViolationCode
impl StructuralPartialEq for ViolationCode
Auto Trait Implementations§
impl Forget for ViolationCode
impl Freeze for ViolationCode
impl RefUnwindSafe for ViolationCode
impl Send for ViolationCode
impl Sync for ViolationCode
impl Unpin for ViolationCode
impl UnsafeUnpin for ViolationCode
impl UnwindSafe for ViolationCode
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