Struct chalk_solve::coherence::CoherenceSolver
source · pub struct CoherenceSolver<'a, I: Interner> {
db: &'a dyn RustIrDatabase<I>,
solver_builder: &'a dyn Fn() -> Box<dyn Solver<I>>,
trait_id: TraitId<I>,
}
Fields§
§db: &'a dyn RustIrDatabase<I>
§solver_builder: &'a dyn Fn() -> Box<dyn Solver<I>>
§trait_id: TraitId<I>
Implementations§
source§impl<I: Interner> CoherenceSolver<'_, I>
impl<I: Interner> CoherenceSolver<'_, I>
pub(super) fn visit_specializations_of_trait( &self, record_specialization: impl FnMut(ImplId<I>, ImplId<I>), ) -> Result<(), CoherenceError<I>>
fn disjoint(&self, lhs: &ImplDatum<I>, rhs: &ImplDatum<I>) -> bool
fn specializes( &self, less_special_id: ImplId<I>, more_special_id: ImplId<I>, ) -> bool
source§impl<'a, I> CoherenceSolver<'a, I>where
I: Interner,
impl<'a, I> CoherenceSolver<'a, I>where
I: Interner,
sourcepub fn new(
db: &'a dyn RustIrDatabase<I>,
solver_builder: &'a dyn Fn() -> Box<dyn Solver<I>>,
trait_id: TraitId<I>,
) -> Self
pub fn new( db: &'a dyn RustIrDatabase<I>, solver_builder: &'a dyn Fn() -> Box<dyn Solver<I>>, trait_id: TraitId<I>, ) -> Self
Constructs a new CoherenceSolver
.
pub fn specialization_priorities( &self, ) -> Result<Arc<SpecializationPriorities<I>>, CoherenceError<I>>
fn build_specialization_forest( &self, ) -> Result<Graph<ImplId<I>, ()>, CoherenceError<I>>
fn set_priorities( &self, idx: NodeIndex, forest: &Graph<ImplId<I>, ()>, p: usize, map: &mut SpecializationPriorities<I>, )
Auto Trait Implementations§
impl<'a, I> Freeze for CoherenceSolver<'a, I>
impl<'a, I> !RefUnwindSafe for CoherenceSolver<'a, I>
impl<'a, I> !Send for CoherenceSolver<'a, I>
impl<'a, I> !Sync for CoherenceSolver<'a, I>
impl<'a, I> Unpin for CoherenceSolver<'a, I>
impl<'a, I> !UnwindSafe for CoherenceSolver<'a, I>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Cast for T
impl<T> Cast for T
source§fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
Cast a value to type
U
using CastTo
.