Trait chalk_ir::zip::Zip

source ·
pub trait Zip<I>: Debug
where I: Interner,
{ // Required method fn zip_with<Z: Zipper<I>>( zipper: &mut Z, variance: Variance, a: &Self, b: &Self, ) -> Fallible<()>; }
Expand description

The Zip trait walks two values, invoking the Zipper methods where appropriate, but otherwise requiring strict equality.

See Zipper trait for more details.

To implement the trait, typically you would use one of the macros like eq_zip!, struct_zip!, or enum_zip!.

Required Methods§

source

fn zip_with<Z: Zipper<I>>( zipper: &mut Z, variance: Variance, a: &Self, b: &Self, ) -> Fallible<()>

Uses the zipper to walk through two values, ensuring that they match.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T: ?Sized + Zip<I>, I: Interner> Zip<I> for &'a T

source§

fn zip_with<Z: Zipper<I>>( zipper: &mut Z, variance: Variance, a: &Self, b: &Self, ) -> Fallible<()>

source§

impl<I: Interner> Zip<I> for ()

source§

fn zip_with<Z: Zipper<I>>( _: &mut Z, _: Variance, _: &Self, _: &Self, ) -> Fallible<()>

source§

impl<I: Interner> Zip<I> for PhantomData<I>

source§

fn zip_with<Z: Zipper<I>>( _zipper: &mut Z, _variance: Variance, a: &Self, b: &Self, ) -> Fallible<()>

source§

impl<T: Zip<I>, I: Interner> Zip<I> for [T]

source§

fn zip_with<Z: Zipper<I>>( zipper: &mut Z, variance: Variance, a: &Self, b: &Self, ) -> Fallible<()>

source§

impl<T: Zip<I>, I: Interner> Zip<I> for Box<T>

source§

fn zip_with<Z: Zipper<I>>( zipper: &mut Z, variance: Variance, a: &Self, b: &Self, ) -> Fallible<()>

source§

impl<T: Zip<I>, I: Interner> Zip<I> for Arc<T>

source§

fn zip_with<Z: Zipper<I>>( zipper: &mut Z, variance: Variance, a: &Self, b: &Self, ) -> Fallible<()>

source§

impl<T: Zip<I>, I: Interner> Zip<I> for Vec<T>

source§

fn zip_with<Z: Zipper<I>>( zipper: &mut Z, variance: Variance, a: &Self, b: &Self, ) -> Fallible<()>

source§

impl<T: Zip<I>, U: Zip<I>, I: Interner> Zip<I> for (T, U)

source§

fn zip_with<Z: Zipper<I>>( zipper: &mut Z, variance: Variance, a: &Self, b: &Self, ) -> Fallible<()>

Implementors§

source§

impl<I: Interner> Zip<I> for AliasTy<I>

source§

impl<I: Interner> Zip<I> for ClausePriority

source§

impl<I: Interner> Zip<I> for Constraint<I>

source§

impl<I: Interner> Zip<I> for DomainGoal<I>

source§

impl<I: Interner> Zip<I> for FromEnv<I>

source§

impl<I: Interner> Zip<I> for GenericArgData<I>

source§

impl<I: Interner> Zip<I> for GoalData<I>

source§

impl<I: Interner> Zip<I> for Mutability

source§

impl<I: Interner> Zip<I> for QuantifierKind

source§

impl<I: Interner> Zip<I> for Scalar

source§

impl<I: Interner> Zip<I> for VariableKind<I>

source§

impl<I: Interner> Zip<I> for WellFormed<I>

source§

impl<I: Interner> Zip<I> for WhereClause<I>

source§

impl<I: Interner> Zip<I> for AdtId<I>

source§

impl<I: Interner> Zip<I> for AliasEq<I>

source§

impl<I: Interner> Zip<I> for AssocTypeId<I>

source§

impl<I: Interner> Zip<I> for ClosureId<I>

source§

impl<I: Interner> Zip<I> for Const<I>

source§

impl<I: Interner> Zip<I> for Constraints<I>

source§

impl<I: Interner> Zip<I> for CoroutineId<I>

source§

impl<I: Interner> Zip<I> for DynTy<I>

source§

impl<I: Interner> Zip<I> for Environment<I>

source§

impl<I: Interner> Zip<I> for EqGoal<I>

source§

impl<I: Interner> Zip<I> for FnDefId<I>

source§

impl<I: Interner> Zip<I> for FnSubst<I>

source§

impl<I: Interner> Zip<I> for ForeignDefId<I>

source§

impl<I: Interner> Zip<I> for GenericArg<I>

source§

impl<I: Interner> Zip<I> for Goal<I>

source§

impl<I: Interner> Zip<I> for Goals<I>

source§

impl<I: Interner> Zip<I> for Lifetime<I>

source§

impl<I: Interner> Zip<I> for LifetimeOutlives<I>

source§

impl<I: Interner> Zip<I> for Normalize<I>

source§

impl<I: Interner> Zip<I> for OpaqueTy<I>

source§

impl<I: Interner> Zip<I> for OpaqueTyId<I>

source§

impl<I: Interner> Zip<I> for PlaceholderIndex

source§

impl<I: Interner> Zip<I> for ProgramClause<I>

source§

impl<I: Interner> Zip<I> for ProgramClauseData<I>

source§

impl<I: Interner> Zip<I> for ProgramClauseImplication<I>

source§

impl<I: Interner> Zip<I> for ProgramClauses<I>

source§

impl<I: Interner> Zip<I> for ProjectionTy<I>

source§

impl<I: Interner> Zip<I> for QuantifiedWhereClauses<I>

source§

impl<I: Interner> Zip<I> for SubtypeGoal<I>

source§

impl<I: Interner> Zip<I> for TraitId<I>

source§

impl<I: Interner> Zip<I> for TraitRef<I>

source§

impl<I: Interner> Zip<I> for Ty<I>

source§

impl<I: Interner> Zip<I> for TypeOutlives<I>

source§

impl<I: Interner, T> Zip<I> for Binders<T>
where T: Clone + HasInterner<Interner = I> + Zip<I> + TypeFoldable<I>,

source§

impl<T: HasInterner<Interner = I> + Zip<I>, I: Interner> Zip<I> for InEnvironment<T>