[][src]Trait chalk_ir::cast::CastTo

pub trait CastTo<T: HasInterner>: Sized {
    fn cast_to(self, interner: &T::Interner) -> T;
}

The "helper" trait for cast that actually implements the transformations. You can also use this if you want to have functions that take (e.g.) an impl CastTo<Goal<_>> or something like that.

Required methods

fn cast_to(self, interner: &T::Interner) -> T

Cast a value to type T.

Loading content...

Implementations on Foreign Types

impl<T, U> CastTo<Option<U>> for Option<T> where
    T: CastTo<U>,
    U: HasInterner
[src]

impl<T, U, E> CastTo<Result<U, E>> for Result<T, E> where
    T: CastTo<U>,
    U: HasInterner
[src]

impl<T, U> CastTo<Vec<U>> for Vec<T> where
    T: CastTo<U> + HasInterner,
    U: HasInterner
[src]

impl<T, '_> CastTo<T> for &'_ T where
    T: Clone + HasInterner
[src]

Loading content...

Implementors

impl<I> CastTo<TypeName<I>> for AdtId<I> where
    I: Interner
[src]

impl<I> CastTo<TypeName<I>> for FnDefId<I> where
    I: Interner
[src]

impl<I> CastTo<TypeName<I>> for GeneratorId<I> where
    I: Interner
[src]

impl<I> CastTo<TypeName<I>> for OpaqueTyId<I> where
    I: Interner
[src]

impl<I, T> CastTo<ProgramClause<I>> for Binders<T> where
    I: Interner,
    T: HasInterner<Interner = I> + CastTo<DomainGoal<I>>, 
[src]

impl<I: Interner> CastTo<Constraint<I>> for Constraint<I>[src]

impl<I: Interner> CastTo<DomainGoal<I>> for DomainGoal<I>[src]

impl<I: Interner> CastTo<DomainGoal<I>> for FromEnv<I>[src]

impl<I: Interner> CastTo<DomainGoal<I>> for WellFormed<I>[src]

impl<I: Interner> CastTo<DomainGoal<I>> for Normalize<I>[src]

impl<I: Interner> CastTo<LifetimeData<I>> for LifetimeData<I>[src]

impl<I: Interner> CastTo<TyData<I>> for AliasTy<I>[src]

impl<I: Interner> CastTo<TyData<I>> for TyData<I>[src]

impl<I: Interner> CastTo<TyData<I>> for ApplicationTy<I>[src]

impl<I: Interner> CastTo<VariableKind<I>> for VariableKind<I>[src]

impl<I: Interner> CastTo<WhereClause<I>> for WhereClause<I>[src]

impl<I: Interner> CastTo<WhereClause<I>> for AliasEq<I>[src]

impl<I: Interner> CastTo<WhereClause<I>> for LifetimeOutlives<I>[src]

impl<I: Interner> CastTo<WhereClause<I>> for TraitRef<I>[src]

impl<I: Interner> CastTo<Binders<WhereClause<I>>> for QuantifiedWhereClause<I>[src]

impl<I: Interner> CastTo<CanonicalVarKinds<I>> for CanonicalVarKinds<I>[src]

impl<I: Interner> CastTo<ConstData<I>> for ConstData<I>[src]

impl<I: Interner> CastTo<GenericArg<I>> for Const<I>[src]

impl<I: Interner> CastTo<GenericArg<I>> for GenericArg<I>[src]

impl<I: Interner> CastTo<GenericArg<I>> for Lifetime<I>[src]

impl<I: Interner> CastTo<GenericArg<I>> for Ty<I>[src]

impl<I: Interner> CastTo<Goal<I>> for EqGoal<I>[src]

impl<I: Interner> CastTo<Goal<I>> for Goal<I>[src]

impl<I: Interner> CastTo<ProgramClause<I>> for ProgramClause<I>[src]

impl<I: Interner> CastTo<TraitRef<I>> for TraitRef<I>[src]

impl<I: Interner> CastTo<VariableKinds<I>> for VariableKinds<I>[src]

impl<I: Interner> CastTo<WithKind<I, UniverseIndex>> for CanonicalVarKind<I>[src]

impl<I: Interner, T: HasInterner<Interner = I> + CastTo<Goal<I>>> CastTo<Goal<I>> for Binders<T>[src]

impl<T, I> CastTo<DomainGoal<I>> for T where
    T: CastTo<WhereClause<I>>,
    I: Interner
[src]

impl<T, I> CastTo<ProgramClause<I>> for T where
    T: CastTo<DomainGoal<I>>,
    I: Interner
[src]

impl<T, I: Interner> CastTo<Goal<I>> for T where
    T: CastTo<DomainGoal<I>>, 
[src]

impl<T, U> CastTo<Canonical<U>> for Canonical<T> where
    T: CastTo<U> + HasInterner,
    U: HasInterner<Interner = T::Interner>, 
[src]

impl<T, U, I> CastTo<InEnvironment<U>> for InEnvironment<T> where
    T: HasInterner<Interner = I> + CastTo<U>,
    U: HasInterner<Interner = I>,
    I: Interner
[src]

Loading content...