#[non_exhaustive]pub enum ReflectError {
Show 13 variants
PartiallyInitialized {
field: Field,
},
NoSuchVariant {
enum_def: EnumDef,
},
WrongShape {
expected: &'static Shape,
actual: &'static Shape,
},
WasNotA {
expected: &'static str,
actual: &'static Shape,
},
UninitializedField {
shape: &'static Shape,
field_name: &'static str,
},
UninitializedEnumField {
shape: &'static Shape,
field_name: &'static str,
variant_name: &'static str,
},
NoVariantSelected {
shape: &'static Shape,
},
UninitializedValue {
shape: &'static Shape,
},
InvariantViolation {
invariant: &'static str,
},
MissingCharacteristic {
shape: &'static Shape,
characteristic: Characteristic,
},
OperationFailed {
shape: &'static Shape,
operation: &'static str,
},
FieldError {
shape: &'static Shape,
field_error: FieldError,
},
Unknown,
}Expand description
Errors that can occur when reflecting on types.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
PartiallyInitialized
Tried to build or build_in_place a struct/enum without initializing all fields.
NoSuchVariant
Tried to set an enum to a variant that does not exist
WrongShape
Tried to get the wrong shape out of a value — e.g. we were manipulating
a String, but .get() was called with a u64 or something.
Fields
WasNotA
Attempted to perform an operation that expected a struct or something
Fields
UninitializedField
A field was not initialized during build
Fields
UninitializedEnumField
A field in an enum variant was not initialized during build
Fields
NoVariantSelected
An enum had no variant selected during build
UninitializedValue
A scalar value was not initialized during build
InvariantViolation
An invariant of the reflection system was violated.
MissingCharacteristic
Attempted to set a value to its default, but the value doesn’t implement Default.
Fields
characteristic: CharacteristicThe characteristic that is missing.
OperationFailed
An operation failed for a given shape
Fields
FieldError
An error occurred when attempting to access or modify a field.
Fields
field_error: FieldErrorThe specific error that occurred with the field.
Unknown
An unknown error occurred.