pub trait AssignabilityOverrideProvider {
// Required methods
fn enum_assignability_override(
&self,
source: TypeId,
target: TypeId,
) -> Option<bool>;
fn abstract_constructor_assignability_override(
&self,
source: TypeId,
target: TypeId,
) -> Option<bool>;
fn constructor_accessibility_override(
&self,
source: TypeId,
target: TypeId,
) -> Option<bool>;
}Expand description
Trait for providing checker-specific assignability overrides.
This allows the solver’s CompatChecker to call back into the checker
for special cases that require binder/symbol information (enums,
abstract constructors, constructor accessibility).
Required Methods§
Sourcefn enum_assignability_override(
&self,
source: TypeId,
target: TypeId,
) -> Option<bool>
fn enum_assignability_override( &self, source: TypeId, target: TypeId, ) -> Option<bool>
Override for enum assignability rules. Returns Some(true/false) if the override applies, None to fall through to structural checking.