pub enum ValueError {
Show 35 variants
UnsupportedFeature {
path: ValuePath,
feature: &'static str,
},
ShapeMismatch {
path: ValuePath,
expected: String,
found: String,
},
VariantCaseOutOfRange {
path: ValuePath,
case: u32,
case_count: usize,
},
EnumCaseOutOfRange {
path: ValuePath,
case: u32,
case_count: usize,
},
RecordArityMismatch {
path: ValuePath,
expected: usize,
found: usize,
},
TupleArityMismatch {
path: ValuePath,
expected: usize,
found: usize,
},
FlagsArityMismatch {
path: ValuePath,
expected: usize,
found: usize,
},
FixedListLengthMismatch {
path: ValuePath,
expected: u32,
found: usize,
},
DanglingRef {
path: ValuePath,
type_id: TypeId,
},
RecursiveRef {
path: ValuePath,
type_id: TypeId,
},
UnionUnknownTag {
path: ValuePath,
tag: String,
},
UnionDiscriminatorMismatch {
path: ValuePath,
tag: String,
},
VariantPayloadPresenceMismatch {
path: ValuePath,
expected_some: bool,
},
ResultPayloadPresenceMismatch {
path: ValuePath,
expected_some: bool,
side: ResultSide,
},
OptionInnerPresenceMismatch {
path: ValuePath,
},
TextLanguageNotAllowed {
path: ValuePath,
language: String,
},
TextTooShort {
path: ValuePath,
min: u32,
found: usize,
},
TextTooLong {
path: ValuePath,
max: u32,
found: usize,
},
TextRegexMismatch {
path: ValuePath,
regex: String,
},
BinaryMimeNotAllowed {
path: ValuePath,
mime_type: String,
},
BinaryTooSmall {
path: ValuePath,
min: u32,
found: usize,
},
BinaryTooLarge {
path: ValuePath,
max: u32,
found: usize,
},
PathEmpty {
path: ValuePath,
},
PathExtensionNotAllowed {
path: ValuePath,
extension: String,
},
UrlEmpty {
path: ValuePath,
},
UrlInvalid {
path: ValuePath,
url: String,
reason: String,
},
UrlSchemeNotAllowed {
path: ValuePath,
scheme: String,
},
UrlHostNotAllowed {
path: ValuePath,
host: String,
},
UrlHostMissing {
path: ValuePath,
},
QuantityUnitNotAllowed {
path: ValuePath,
unit: String,
},
QuantityOutOfRange {
path: ValuePath,
reason: String,
},
NumericOutOfRange {
path: ValuePath,
reason: String,
},
SecretCategoryMismatch {
path: ValuePath,
expected: String,
found: Option<String>,
},
QuotaTokenResourceMismatch {
path: ValuePath,
expected: String,
found: String,
},
PermissionCardPolymorphicMismatch {
path: ValuePath,
expected: bool,
found: bool,
},
}Expand description
All errors raised by validate_value.
Variants§
UnsupportedFeature
Validation requires an optional Cargo feature.
ShapeMismatch
VariantCaseOutOfRange
EnumCaseOutOfRange
RecordArityMismatch
TupleArityMismatch
FlagsArityMismatch
FixedListLengthMismatch
DanglingRef
RecursiveRef
A chain of named references at one value position resolves back
to itself (e.g. A = Ref<A> or a mutual cycle A → B → A) before
reaching a structural shape, so no finite value can ever satisfy
it.
UnionUnknownTag
UnionDiscriminatorMismatch
VariantPayloadPresenceMismatch
ResultPayloadPresenceMismatch
OptionInnerPresenceMismatch
TextLanguageNotAllowed
TextTooShort
TextTooLong
TextRegexMismatch
BinaryMimeNotAllowed
BinaryTooSmall
BinaryTooLarge
PathEmpty
PathExtensionNotAllowed
UrlEmpty
UrlInvalid
UrlSchemeNotAllowed
UrlHostNotAllowed
UrlHostMissing
QuantityUnitNotAllowed
QuantityOutOfRange
NumericOutOfRange
SecretCategoryMismatch
QuotaTokenResourceMismatch
PermissionCardPolymorphicMismatch
Trait Implementations§
Source§impl Clone for ValueError
impl Clone for ValueError
Source§fn clone(&self) -> ValueError
fn clone(&self) -> ValueError
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 ValueError
impl Debug for ValueError
Source§impl Display for ValueError
impl Display for ValueError
Source§impl Error for ValueError
impl Error for ValueError
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 PartialEq for ValueError
impl PartialEq for ValueError
impl StructuralPartialEq for ValueError
Auto Trait Implementations§
impl Freeze for ValueError
impl RefUnwindSafe for ValueError
impl Send for ValueError
impl Sync for ValueError
impl Unpin for ValueError
impl UnsafeUnpin for ValueError
impl UnwindSafe for ValueError
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