#[non_exhaustive]pub enum MetadataError {
Show 14 variants
ValueAccess {
key: String,
source: Box<ValueError>,
},
MissingKey(String),
TypeMismatch {
key: String,
expected: DataType,
actual: DataType,
message: String,
},
WireLimitExceeded {
kind: MetadataWireLimitKind,
value: usize,
maximum: usize,
},
MissingRequiredField {
key: String,
expected: DataType,
},
UnknownField {
key: String,
},
UnknownFilterField {
key: String,
},
InvalidFilterOperator {
key: String,
operator: &'static str,
data_type: DataType,
message: String,
},
InvalidFilterExpression {
message: String,
},
InvalidFilterOperand {
operator: &'static str,
data_type: DataType,
message: String,
},
MissingFilterExpression,
InvalidFilterLimit {
kind: FilterLimitKind,
value: usize,
maximum: usize,
},
FilterLimitExceeded {
kind: FilterLimitKind,
value: usize,
maximum: usize,
},
DuplicateSchemaField {
key: String,
},
}Expand description
Errors produced by explicit metadata accessors and schema validation.
§Examples
use qubit_metadata::MetadataError;
let error = MetadataError::MissingKey("tenant".to_owned());
assert!(error.to_string().contains("tenant"));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ValueAccess
A strict read or explicit conversion failed without losing its source.
MissingKey(String)
The requested key does not exist.
TypeMismatch
Schema validation found a stored value of the wrong type.
Fields
WireLimitExceeded
A metadata or schema value exceeds a strict V1 wire limit.
Fields
kind: MetadataWireLimitKindWire resource category that exceeded its limit.
MissingRequiredField
A required schema field is missing from a metadata object.
Fields
UnknownField
A metadata object contains a key not accepted by the schema.
UnknownFilterField
A filter references a key that is not defined by the schema.
InvalidFilterOperator
A filter uses an operator that is not compatible with the field type.
Fields
InvalidFilterExpression
A filter expression is structurally invalid.
InvalidFilterOperand
A filter condition uses an operand with no stable matching semantics.
Fields
MissingFilterExpression
A metadata-filter builder was finalized without an expression.
InvalidFilterLimit
A configured filter resource bound is outside the allowed range.
Fields
kind: FilterLimitKindResource category being configured.
FilterLimitExceeded
A filter exceeds an enforced resource bound.
Fields
kind: FilterLimitKindResource category that exceeded its limit.
DuplicateSchemaField
A schema builder declares the same field more than once.
Trait Implementations§
Source§impl Clone for MetadataError
impl Clone for MetadataError
Source§fn clone(&self) -> MetadataError
fn clone(&self) -> MetadataError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MetadataError
impl Debug for MetadataError
Source§impl Display for MetadataError
impl Display for MetadataError
impl Eq for MetadataError
Source§impl Error for MetadataError
impl Error for MetadataError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the original value error for strict and explicit conversion reads.
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()