pub trait QuirkRegistry {
type Quirk: Serialize + DeserializeOwned + Clone;
// Required method
fn registry() -> Vec<(&'static str, Vec<Self::Quirk>)>;
// Provided methods
fn for_package(name: &str) -> Vec<Self::Quirk> { ... }
fn registered_names() -> Vec<&'static str> { ... }
}Expand description
The typed shape of an adapter’s quirk registry. The registry is the canonical knowledge of “which upstream packages need which build-time workarounds.” Each adapter ships its own typed quirk enum + a const REGISTRY table.
Implementations should be implementable from a TOML side-table
(declarative) or a Rust constructor function — both are valid.
The QuirkRegistry derive macro auto-implements from TOML.
Required Associated Types§
Sourcetype Quirk: Serialize + DeserializeOwned + Clone
type Quirk: Serialize + DeserializeOwned + Clone
The ecosystem’s typed quirk variant set.
Required Methods§
Provided Methods§
Sourcefn for_package(name: &str) -> Vec<Self::Quirk>
fn for_package(name: &str) -> Vec<Self::Quirk>
Lookup quirks for a single package by name. Returns empty Vec when no quirks registered (never None).
Sourcefn registered_names() -> Vec<&'static str>
fn registered_names() -> Vec<&'static str>
Every package name with at least one registered quirk. Used by invariants to detect drift between the registry and the spec’s emission.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".