pub trait Invariants {
type Spec: Spec;
type Violation: Serialize + DeserializeOwned + Clone;
// Required method
fn check(spec: &Self::Spec) -> Vec<Self::Violation>;
}Expand description
The typed shape of an adapter’s invariants pass. Every adapter
ships a check(spec) -> Vec<Violation> function that verifies
the spec is well-formed against its own typed rules.
gen confirm invokes this per-adapter. cse-lint can invoke it
fleet-wide.
Required Associated Types§
Sourcetype Spec: Spec
type Spec: Spec
The adapter’s spec type — pinned to the same Spec impl as
the adapter’s build() returns.
Sourcetype Violation: Serialize + DeserializeOwned + Clone
type Violation: Serialize + DeserializeOwned + Clone
The adapter’s typed violation enum. Always serializable so
gen confirm / cse-lint / IDE tooling can consume the
payload uniformly.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".