pub trait ContributionTarget {
type Contribution: Contribution;
type Runtime;
type Error;
const ID: ContributionTargetId;
// Required method
fn build(
&self,
contributions: &[(ModuleId, Self::Contribution)],
) -> Result<Self::Runtime, Self::Error>;
}Expand description
A domain-owned compiler from declarations to a runtime representation.
The target owns validation, conflict rules, ordering, and its empty-input behavior. Core does not prescribe any of those semantics.
Required Associated Constants§
Sourceconst ID: ContributionTargetId
const ID: ContributionTargetId
Stable semantic identity; not a display label.
Required Associated Types§
Sourcetype Contribution: Contribution
type Contribution: Contribution
The declaration type accepted by this target.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".