cairo_lang_semantic::substitution

Trait SemanticRewriter

source
pub trait SemanticRewriter<T, Error> {
    // Required method
    fn internal_rewrite(
        &mut self,
        value: &mut T,
    ) -> Result<RewriteResult, Error>;

    // Provided method
    fn rewrite(&mut self, value: T) -> Result<T, Error> { ... }
}

Required Methods§

source

fn internal_rewrite(&mut self, value: &mut T) -> Result<RewriteResult, Error>

Provided Methods§

source

fn rewrite(&mut self, value: T) -> Result<T, Error>

Implementors§

source§

impl SemanticRewriter<ConstValue, NoError> for Inference<'_>

source§

impl SemanticRewriter<ConstValue, DiagnosticAdded> for SubstitutionRewriter<'_>

source§

impl SemanticRewriter<GenericFunctionId, DiagnosticAdded> for SubstitutionRewriter<'_>

source§

impl SemanticRewriter<ImplLongId, NoError> for Inference<'_>

source§

impl SemanticRewriter<ImplLongId, DiagnosticAdded> for SubstitutionRewriter<'_>

source§

impl SemanticRewriter<TypeLongId, NoError> for Inference<'_>

source§

impl SemanticRewriter<TypeLongId, DiagnosticAdded> for SubstitutionRewriter<'_>

source§

impl SemanticRewriter<ImplId, NoError> for Inference<'_>

source§

impl SemanticRewriter<ImplId, DiagnosticAdded> for SubstitutionRewriter<'_>

source§

impl SemanticRewriter<TypeId, NoError> for Inference<'_>

source§

impl SemanticRewriter<TypeId, DiagnosticAdded> for SubstitutionRewriter<'_>

source§

impl<'a> SemanticRewriter<VarId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<VarId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<InferenceId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<InferenceId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<InferenceVar, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<InferenceVar, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<Ambiguity, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<Condition, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<Expr, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprFunctionCallArg, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprVarMemberPath, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprVarMemberPath, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<FixedSizeArrayItems, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<Statement, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<Pattern, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<MatchArmSelector, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<MatchArmSelector, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<GenericFunctionId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<GenericFunctionWithBodyId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<GenericFunctionWithBodyId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ImplFunctionBodyId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ImplFunctionBodyId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<GenericArgumentId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<GenericArgumentId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<GenericParam, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<GenericParam, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<UninferredImpl, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<UninferredImpl, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteTypeId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteTypeId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConstVar, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConstVar, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ImplVar, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ImplVar, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ImplVarId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ImplVarId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<LocalConstVarId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<LocalConstVarId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<LocalImplVarId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<LocalImplVarId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<LocalTypeVarId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<LocalTypeVarId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<TypeVar, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<TypeVar, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ExprAssignment, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprBlock, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprClosure, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprConstant, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprDesnap, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprEnumVariantCtor, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprFixedSizeArray, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprFor, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprFunctionCall, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprIf, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprLiteral, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprLogicalOperator, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprLoop, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprMatch, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprMemberAccess, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprMissing, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprPropagateError, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprSnapshot, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprStringLiteral, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprStructCtor, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprTuple, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprVar, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExprVar, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ExprWhile, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<MatchArm, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<StatementBreak, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<StatementContinue, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<StatementExpr, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<StatementItem, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<StatementLet, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<StatementReturn, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<PatternEnumVariant, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<PatternFixedSizeArray, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<PatternLiteral, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<PatternMissing, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<PatternOtherwise, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<PatternStringLiteral, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<PatternStruct, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<PatternTuple, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<PatternVariable, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConstValueId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConstValueId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ImplConstantId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ImplConstantId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteVariant, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteVariant, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ValueSelectorArm, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ValueSelectorArm, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteFunction, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteFunction, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteFunctionWithBody, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteFunctionWithBody, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteFunctionWithBodyId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteFunctionWithBodyId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<FunctionId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<FunctionId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<FunctionLongId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<FunctionLongId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ImplGenericFunctionId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ImplGenericFunctionId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ImplGenericFunctionWithBodyId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ImplGenericFunctionWithBodyId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<Signature, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<Signature, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<GenericParamConst, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<GenericParamConst, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<GenericParamImpl, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<GenericParamImpl, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<GenericParamType, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<GenericParamType, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteImplId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteImplId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteImplLongId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteImplLongId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<GeneratedImplId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<GeneratedImplId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<GeneratedImplItems, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<GeneratedImplItems, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<GeneratedImplLongId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<GeneratedImplLongId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ImplImplId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ImplImplId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<UninferredGeneratedImplId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<UninferredGeneratedImplId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<UninferredGeneratedImplLongId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<UninferredGeneratedImplLongId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<Member, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteTraitGenericFunctionId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteTraitGenericFunctionId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteTraitGenericFunctionLongId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteTraitGenericFunctionLongId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteTraitId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteTraitId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteTraitLongId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteTraitLongId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<LocalVariable, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ParamId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ParamId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<Parameter, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<Parameter, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ClosureTypeLongId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ClosureTypeLongId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteEnumId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteEnumId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteEnumLongId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteEnumLongId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteExternTypeId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteExternTypeId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteExternTypeLongId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteExternTypeLongId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteStructId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteStructId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConcreteStructLongId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ConcreteStructLongId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ImplTypeId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ImplTypeId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ConstantId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<EnumId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<EnumId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ExternFunctionId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExternFunctionId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ExternTypeId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ExternTypeId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<FreeFunctionId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<FreeFunctionId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<GenericParamId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<GenericParamId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ImplAliasId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ImplAliasId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ImplDefId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ImplDefId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ImplFunctionId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ImplFunctionId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<ImplImplDefId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<ImplImplDefId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<LocalVarId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<LocalVarId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<MemberId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<MemberId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<StructId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<StructId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<TraitConstantId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<TraitConstantId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<TraitFunctionId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<TraitFunctionId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<TraitId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<TraitId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<TraitImplId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<TraitImplId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<TraitTypeId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<TraitTypeId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<VariantId, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<VariantId, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<Id<Expr>, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<Id<Expr>, DiagnosticAdded> for SubstitutionRewriter<'a>

source§

impl<'a> SemanticRewriter<Id<Statement>, NoError> for Inference<'a>

source§

impl<'a> SemanticRewriter<Id<Pattern>, NoError> for Inference<'a>

source§

impl<T0, T1, E, TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>> SemanticRewriter<(T0, T1), E> for TRewriter

source§

impl<T, E, TRewriter: SemanticRewriter<T, E>> SemanticRewriter<Option<T>, E> for TRewriter

source§

impl<T, E, TRewriter: SemanticRewriter<T, E>> SemanticRewriter<Box<T>, E> for TRewriter

source§

impl<T, E, TRewriter: SemanticRewriter<T, E>> SemanticRewriter<VecDeque<T>, E> for TRewriter

source§

impl<T, E, TRewriter: SemanticRewriter<T, E>, E2> SemanticRewriter<Result<T, E2>, E> for TRewriter

source§

impl<T: Clone, E, TRewriter: SemanticRewriter<T, E>> SemanticRewriter<Vec<T>, E> for TRewriter

source§

impl<T: Clone, V: Clone, E, TRewriter: SemanticRewriter<V, E>> SemanticRewriter<OrderedHashMap<T, V>, E> for TRewriter