Trait rustc_trait_selection::traits::util::traits::TraitEngine
source · [−]pub trait TraitEngine<'tcx>: 'tcx {
fn normalize_projection_type(
&mut self,
infcx: &InferCtxt<'_>,
param_env: ParamEnv,
projection_ty: ProjectionTy,
cause: ObligationCause
) -> &TyS;
fn register_predicate_obligation(
&mut self,
infcx: &InferCtxt<'_>,
obligation: Obligation<Predicate>
);
fn select_all_or_error(
&mut self,
infcx: &InferCtxt<'_>
) -> Vec<FulfillmentError, Global>;
fn select_where_possible(
&mut self,
infcx: &InferCtxt<'_>
) -> Vec<FulfillmentError, Global>;
fn pending_obligations(&self) -> Vec<Obligation<Predicate>, Global>;
fn relationships(
&mut self
) -> &mut HashMap<TyVid, FoundRelationships, BuildHasherDefault<FxHasher>>;
fn register_bound(
&mut self,
infcx: &InferCtxt<'_>,
param_env: ParamEnv,
ty: &TyS,
def_id: DefId,
cause: ObligationCause
) { ... }
}Required methods
fn normalize_projection_type(
&mut self,
infcx: &InferCtxt<'_>,
param_env: ParamEnv,
projection_ty: ProjectionTy,
cause: ObligationCause
) -> &TyS
fn register_predicate_obligation(
&mut self,
infcx: &InferCtxt<'_>,
obligation: Obligation<Predicate>
)
fn select_all_or_error(
&mut self,
infcx: &InferCtxt<'_>
) -> Vec<FulfillmentError, Global>
fn select_where_possible(
&mut self,
infcx: &InferCtxt<'_>
) -> Vec<FulfillmentError, Global>
fn pending_obligations(&self) -> Vec<Obligation<Predicate>, Global>
fn relationships(
&mut self
) -> &mut HashMap<TyVid, FoundRelationships, BuildHasherDefault<FxHasher>>
Provided methods
fn register_bound(
&mut self,
infcx: &InferCtxt<'_>,
param_env: ParamEnv,
ty: &TyS,
def_id: DefId,
cause: ObligationCause
)
fn register_bound(
&mut self,
infcx: &InferCtxt<'_>,
param_env: ParamEnv,
ty: &TyS,
def_id: DefId,
cause: ObligationCause
)
Requires that ty must implement the trait with def_id in
the given environment. This trait must not have any type
parameters (except for Self).