#[non_exhaustive]pub enum ValidatorRegistryError {
DuplicateId {
id: &'static str,
sources: Vec<RegistrationSource>,
},
InvalidDescriptor {
id: ValidatorId,
registration_source: RegistrationSource,
kind: BindErrorKind,
dependency: Option<String>,
},
}Expand description
Failure while freezing a validator registry.
§Examples
use qubit_validator::{BindErrorKind, RegistrationSource, ValidatorId, ValidatorRegistryError};
let error = ValidatorRegistryError::InvalidDescriptor {
id: ValidatorId::new("text.required"),
registration_source: RegistrationSource::new("rules", "rules::text", "src/text.rs", 12),
kind: BindErrorKind::InvalidDeclaration,
dependency: None,
};
assert!(error.to_string().contains("invalid descriptor"));§Source compatibility
The enum-level non_exhaustive attribute requires external matches to
include a wildcard arm for future variants. It does not prevent external
callers from constructing the current variants or matching all of their
fields. Construction must supply every field of the selected variant.
Patterns may use .. to ignore fields they do not need.
Adding a field to an existing variant can break external construction or complete field patterns and must be evaluated as a source-compatibility change separately from adding an enum variant.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DuplicateId
Multiple registrations claim one stable ID.
Fields
sources: Vec<RegistrationSource>Registration sources in deterministic order.
InvalidDescriptor
A registration contains an invalid descriptor declaration.
Fields
id: ValidatorIdValidator identifier.
registration_source: RegistrationSourceRegistration source.
kind: BindErrorKindDeclaration error kind.
Trait Implementations§
Source§impl Clone for ValidatorRegistryError
impl Clone for ValidatorRegistryError
Source§impl Debug for ValidatorRegistryError
impl Debug for ValidatorRegistryError
Source§impl Display for ValidatorRegistryError
impl Display for ValidatorRegistryError
Source§impl Error for ValidatorRegistryError
impl Error for ValidatorRegistryError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()