cairo_lang_semantic::substitution

Trait SemanticObject

source
pub trait SemanticObject<TRewriter, Error>: Sized {
    // Required method
    fn default_rewrite(
        &mut self,
        rewriter: &mut TRewriter,
    ) -> Result<RewriteResult, Error>;
}

Required Methods§

source

fn default_rewrite( &mut self, rewriter: &mut TRewriter, ) -> Result<RewriteResult, Error>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<ConstValue, Error>> SemanticObject<TRewriter, Error> for ConstValueId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<ImplLongId, Error>> SemanticObject<TRewriter, Error> for ImplId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<TypeLongId, Error>> SemanticObject<TRewriter, Error> for TypeId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<ImplVar, Error>> SemanticObject<TRewriter, Error> for ImplVarId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<ConcreteFunctionWithBody, Error>> SemanticObject<TRewriter, Error> for ConcreteFunctionWithBodyId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<FunctionLongId, Error>> SemanticObject<TRewriter, Error> for FunctionId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<ConcreteImplLongId, Error>> SemanticObject<TRewriter, Error> for ConcreteImplId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<GeneratedImplLongId, Error>> SemanticObject<TRewriter, Error> for GeneratedImplId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<UninferredGeneratedImplLongId, Error>> SemanticObject<TRewriter, Error> for UninferredGeneratedImplId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<ConcreteTraitConstantLongId, Error>> SemanticObject<TRewriter, Error> for ConcreteTraitConstantId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<ConcreteTraitGenericFunctionLongId, Error>> SemanticObject<TRewriter, Error> for ConcreteTraitGenericFunctionId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<ConcreteTraitImplLongId, Error>> SemanticObject<TRewriter, Error> for ConcreteTraitImplId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<ConcreteTraitLongId, Error>> SemanticObject<TRewriter, Error> for ConcreteTraitId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<ConcreteTraitTypeLongId, Error>> SemanticObject<TRewriter, Error> for ConcreteTraitTypeId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<ConcreteEnumLongId, Error>> SemanticObject<TRewriter, Error> for ConcreteEnumId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<ConcreteExternTypeLongId, Error>> SemanticObject<TRewriter, Error> for ConcreteExternTypeId

source§

impl<'a, Error, TRewriter: HasDb<&'a dyn SemanticGroup> + SemanticRewriter<ConcreteStructLongId, Error>> SemanticObject<TRewriter, Error> for ConcreteStructId

source§

impl<T, Error> SemanticObject<T, Error> for StatementContinue

source§

impl<T, Error> SemanticObject<T, Error> for ValueSelectorArm

source§

impl<T: SemanticRewriter<VarId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprVar

source§

impl<T: SemanticRewriter<InferenceId, Error> + SemanticRewriter<ConcreteTraitId, Error>, Error> SemanticObject<T, Error> for ImplVar

source§

impl<T: SemanticRewriter<Condition, Error> + SemanticRewriter<ExprId, Error> + SemanticRewriter<Option<ExprId>, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprIf

source§

impl<T: SemanticRewriter<Condition, Error> + SemanticRewriter<ExprId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprWhile

source§

impl<T: SemanticRewriter<ExprVarMemberPath, Error> + SemanticRewriter<ExprId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprAssignment

source§

impl<T: SemanticRewriter<ExprVarMemberPath, Error> + SemanticRewriter<ExprId, Error>, Error> SemanticObject<T, Error> for ExprFunctionCallArg

source§

impl<T: SemanticRewriter<FixedSizeArrayItems, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprFixedSizeArray

source§

impl<T: SemanticRewriter<GenericFunctionId, Error> + SemanticRewriter<Vec<GenericArgumentId>, Error>, Error> SemanticObject<T, Error> for ConcreteFunction

source§

impl<T: SemanticRewriter<GenericFunctionWithBodyId, Error> + SemanticRewriter<Vec<GenericArgumentId>, Error>, Error> SemanticObject<T, Error> for ConcreteFunctionWithBody

source§

impl<T: SemanticRewriter<ConcreteTypeId, Error> + SemanticRewriter<Vec<TypeId>, Error> + SemanticRewriter<TypeId, Error> + SemanticRewriter<GenericParamId, Error> + SemanticRewriter<TypeVar, Error> + SemanticRewriter<FunctionId, Error> + SemanticRewriter<ConstValueId, Error> + SemanticRewriter<ImplTypeId, Error> + SemanticRewriter<TraitTypeId, Error> + SemanticRewriter<ClosureTypeLongId, Error>, Error> SemanticObject<T, Error> for TypeLongId

source§

impl<T: SemanticRewriter<Option<ExprId>, Error>, Error> SemanticObject<T, Error> for StatementBreak

source§

impl<T: SemanticRewriter<Option<ExprId>, Error>, Error> SemanticObject<T, Error> for StatementReturn

source§

impl<T: SemanticRewriter<LookupItemId, Error> + SemanticRewriter<ImplDefId, Error> + SemanticRewriter<ImplAliasId, Error> + SemanticRewriter<GenericParamId, Error>, Error> SemanticObject<T, Error> for InferenceId

source§

impl<T: SemanticRewriter<usize, Error>, Error> SemanticObject<T, Error> for LocalConstVarId

source§

impl<T: SemanticRewriter<usize, Error>, Error> SemanticObject<T, Error> for LocalImplVarId

source§

impl<T: SemanticRewriter<usize, Error>, Error> SemanticObject<T, Error> for LocalTypeVarId

source§

impl<T: SemanticRewriter<LocalTypeVarId, Error> + SemanticRewriter<LocalConstVarId, Error> + SemanticRewriter<LocalImplVarId, Error>, Error> SemanticObject<T, Error> for InferenceVar

source§

impl<T: SemanticRewriter<ExprLiteral, Error>, Error> SemanticObject<T, Error> for PatternLiteral

source§

impl<T: SemanticRewriter<ExprStringLiteral, Error>, Error> SemanticObject<T, Error> for PatternStringLiteral

source§

impl<T: SemanticRewriter<ExprTuple, Error> + SemanticRewriter<ExprSnapshot, Error> + SemanticRewriter<ExprDesnap, Error> + SemanticRewriter<ExprAssignment, Error> + SemanticRewriter<ExprLogicalOperator, Error> + SemanticRewriter<ExprBlock, Error> + SemanticRewriter<ExprLoop, Error> + SemanticRewriter<ExprWhile, Error> + SemanticRewriter<ExprFor, Error> + SemanticRewriter<ExprFunctionCall, Error> + SemanticRewriter<ExprMatch, Error> + SemanticRewriter<ExprIf, Error> + SemanticRewriter<ExprVar, Error> + SemanticRewriter<ExprLiteral, Error> + SemanticRewriter<ExprStringLiteral, Error> + SemanticRewriter<ExprMemberAccess, Error> + SemanticRewriter<ExprStructCtor, Error> + SemanticRewriter<ExprEnumVariantCtor, Error> + SemanticRewriter<ExprPropagateError, Error> + SemanticRewriter<ExprConstant, Error> + SemanticRewriter<ExprFixedSizeArray, Error> + SemanticRewriter<ExprClosure, Error> + SemanticRewriter<ExprMissing, Error>, Error> SemanticObject<T, Error> for Expr

source§

impl<T: SemanticRewriter<ExprVar, Error> + SemanticRewriter<Box<ExprVarMemberPath>, Error> + SemanticRewriter<MemberId, Error> + SemanticRewriter<ConcreteStructId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprVarMemberPath

source§

impl<T: SemanticRewriter<StatementExpr, Error> + SemanticRewriter<StatementLet, Error> + SemanticRewriter<StatementContinue, Error> + SemanticRewriter<StatementReturn, Error> + SemanticRewriter<StatementBreak, Error>, Error> SemanticObject<T, Error> for Statement

source§

impl<T: SemanticRewriter<PatternLiteral, Error> + SemanticRewriter<PatternStringLiteral, Error> + SemanticRewriter<PatternVariable, Error> + SemanticRewriter<PatternStruct, Error> + SemanticRewriter<PatternTuple, Error> + SemanticRewriter<PatternFixedSizeArray, Error> + SemanticRewriter<PatternEnumVariant, Error> + SemanticRewriter<PatternOtherwise, Error> + SemanticRewriter<PatternMissing, Error>, Error> SemanticObject<T, Error> for Pattern

source§

impl<T: SemanticRewriter<ConstValueId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprConstant

source§

impl<T: SemanticRewriter<ConcreteVariant, Error> + SemanticRewriter<Option<PatternId>, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for PatternEnumVariant

source§

impl<T: SemanticRewriter<ConcreteVariant, Error> + SemanticRewriter<ValueSelectorArm, Error>, Error> SemanticObject<T, Error> for MatchArmSelector

source§

impl<T: SemanticRewriter<ConcreteVariant, Error> + SemanticRewriter<ExprId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprEnumVariantCtor

source§

impl<T: SemanticRewriter<ConcreteFunction, Error>, Error> SemanticObject<T, Error> for FunctionLongId

source§

impl<T: SemanticRewriter<FunctionId, Error> + SemanticRewriter<ExprVarMemberPath, Error> + SemanticRewriter<ExprId, Error> + SemanticRewriter<PatternId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprFor

source§

impl<T: SemanticRewriter<FunctionId, Error> + SemanticRewriter<Vec<ExprFunctionCallArg>, Error> + SemanticRewriter<Option<ExprId>, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprFunctionCall

source§

impl<T: SemanticRewriter<GenericParamType, Error> + SemanticRewriter<GenericParamConst, Error> + SemanticRewriter<GenericParamImpl, Error>, Error> SemanticObject<T, Error> for GenericParam

source§

impl<T: SemanticRewriter<ConcreteImplId, Error> + SemanticRewriter<ImplFunctionBodyId, Error>, Error> SemanticObject<T, Error> for ImplGenericFunctionWithBodyId

source§

impl<T: SemanticRewriter<ConcreteImplId, Error> + SemanticRewriter<GenericParamId, Error> + SemanticRewriter<ImplVarId, Error> + SemanticRewriter<ImplImplId, Error> + SemanticRewriter<TraitImplId, Error> + SemanticRewriter<GeneratedImplId, Error>, Error> SemanticObject<T, Error> for ImplLongId

source§

impl<T: SemanticRewriter<ImplId, Error> + SemanticRewriter<TraitConstantId, Error>, Error> SemanticObject<T, Error> for ImplConstantId

source§

impl<T: SemanticRewriter<ImplId, Error> + SemanticRewriter<TraitFunctionId, Error>, Error> SemanticObject<T, Error> for ImplGenericFunctionId

source§

impl<T: SemanticRewriter<ImplId, Error> + SemanticRewriter<TraitImplId, Error>, Error> SemanticObject<T, Error> for ImplImplId

source§

impl<T: SemanticRewriter<ImplId, Error> + SemanticRewriter<TraitTypeId, Error>, Error> SemanticObject<T, Error> for ImplTypeId

source§

impl<T: SemanticRewriter<ConcreteTraitId, Error> + SemanticRewriter<Vec<GenericArgumentId>, Error> + SemanticRewriter<GeneratedImplItems, Error>, Error> SemanticObject<T, Error> for GeneratedImplLongId

source§

impl<T: SemanticRewriter<ConcreteTraitId, Error> + SemanticRewriter<Vec<GenericParam>, Error> + SemanticRewriter<GeneratedImplItems, Error>, Error> SemanticObject<T, Error> for UninferredGeneratedImplLongId

source§

impl<T: SemanticRewriter<ConcreteTraitId, Error> + SemanticRewriter<Vec<ImplId>, Error> + SemanticRewriter<ImplId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for Ambiguity

source§

impl<T: SemanticRewriter<ConcreteTraitId, Error> + SemanticRewriter<TraitConstantId, Error>, Error> SemanticObject<T, Error> for ConcreteTraitConstantLongId

source§

impl<T: SemanticRewriter<ConcreteTraitId, Error> + SemanticRewriter<TraitFunctionId, Error>, Error> SemanticObject<T, Error> for ConcreteTraitGenericFunctionLongId

source§

impl<T: SemanticRewriter<ConcreteTraitId, Error> + SemanticRewriter<TraitImplId, Error>, Error> SemanticObject<T, Error> for ConcreteTraitImplLongId

source§

impl<T: SemanticRewriter<ConcreteTraitId, Error> + SemanticRewriter<TraitTypeId, Error>, Error> SemanticObject<T, Error> for ConcreteTraitTypeLongId

source§

impl<T: SemanticRewriter<LocalVariable, Error>, Error> SemanticObject<T, Error> for PatternVariable

source§

impl<T: SemanticRewriter<ParamId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for Parameter

source§

impl<T: SemanticRewriter<ConcreteEnumId, Error> + SemanticRewriter<VariantId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ConcreteVariant

source§

impl<T: SemanticRewriter<ConcreteStructId, Error> + SemanticRewriter<ConcreteEnumId, Error> + SemanticRewriter<ConcreteExternTypeId, Error>, Error> SemanticObject<T, Error> for ConcreteTypeId

source§

impl<T: SemanticRewriter<ConcreteStructId, Error> + SemanticRewriter<Vec<(Member, PatternId)>, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for PatternStruct

source§

impl<T: SemanticRewriter<ConcreteStructId, Error> + SemanticRewriter<Vec<(MemberId, ExprId)>, Error> + SemanticRewriter<Option<ExprId>, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprStructCtor

source§

impl<T: SemanticRewriter<TypeId, Error> + SemanticRewriter<ConstValueId, Error> + SemanticRewriter<ImplId, Error>, Error> SemanticObject<T, Error> for GenericArgumentId

source§

impl<T: SemanticRewriter<TypeId, Error> + SemanticRewriter<Vec<ConstValue>, Error> + SemanticRewriter<ConcreteVariant, Error> + SemanticRewriter<Box<ConstValue>, Error> + SemanticRewriter<ImplConstantId, Error> + SemanticRewriter<TraitConstantId, Error> + SemanticRewriter<ConstVar, Error>, Error> SemanticObject<T, Error> for ConstValue

source§

impl<T: SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprLiteral

source§

impl<T: SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprMissing

source§

impl<T: SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprStringLiteral

source§

impl<T: SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for PatternMissing

source§

impl<T: SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for PatternOtherwise

source§

impl<T: SemanticRewriter<Vec<Parameter>, Error> + SemanticRewriter<TypeId, Error> + SemanticRewriter<Vec<TypeId>, Error>, Error> SemanticObject<T, Error> for Signature

source§

impl<T: SemanticRewriter<Vec<TypeId>, Error> + SemanticRewriter<TypeId, Error> + SemanticRewriter<Maybe<FunctionId>, Error>, Error> SemanticObject<T, Error> for ClosureTypeLongId

source§

impl<T: SemanticRewriter<Vec<ExprId>, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprTuple

source§

impl<T: SemanticRewriter<Vec<ExprId>, Error> + SemanticRewriter<ExprId, Error> + SemanticRewriter<ConstValueId, Error>, Error> SemanticObject<T, Error> for FixedSizeArrayItems

source§

impl<T: SemanticRewriter<Vec<PatternId>, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for PatternFixedSizeArray

source§

impl<T: SemanticRewriter<Vec<PatternId>, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for PatternTuple

source§

impl<T: SemanticRewriter<Vec<PatternId>, Error> + SemanticRewriter<ExprId, Error>, Error> SemanticObject<T, Error> for MatchArm

source§

impl<T: SemanticRewriter<Vec<StatementId>, Error> + SemanticRewriter<Option<ExprId>, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprBlock

source§

impl<T: SemanticRewriter<EnumId, Error> + SemanticRewriter<Vec<GenericArgumentId>, Error>, Error> SemanticObject<T, Error> for ConcreteEnumLongId

source§

impl<T: SemanticRewriter<ExternTypeId, Error> + SemanticRewriter<Vec<GenericArgumentId>, Error>, Error> SemanticObject<T, Error> for ConcreteExternTypeLongId

source§

impl<T: SemanticRewriter<FreeFunctionId, Error> + SemanticRewriter<ImplGenericFunctionWithBodyId, Error> + SemanticRewriter<ConcreteTraitGenericFunctionId, Error>, Error> SemanticObject<T, Error> for GenericFunctionWithBodyId

source§

impl<T: SemanticRewriter<FreeFunctionId, Error> + SemanticRewriter<ExternFunctionId, Error> + SemanticRewriter<ImplGenericFunctionId, Error> + SemanticRewriter<ConcreteTraitGenericFunctionId, Error>, Error> SemanticObject<T, Error> for GenericFunctionId

source§

impl<T: SemanticRewriter<GenericParamId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for GenericParamConst

source§

impl<T: SemanticRewriter<GenericParamId, Error> + SemanticRewriter<Maybe<ConcreteTraitId>, Error>, Error> SemanticObject<T, Error> for GenericParamImpl

source§

impl<T: SemanticRewriter<GenericParamId, Error>, Error> SemanticObject<T, Error> for GenericParamType

source§

impl<T: SemanticRewriter<ImplDefId, Error> + SemanticRewriter<Vec<GenericArgumentId>, Error>, Error> SemanticObject<T, Error> for ConcreteImplLongId

source§

impl<T: SemanticRewriter<ImplDefId, Error> + SemanticRewriter<ImplAliasId, Error> + SemanticRewriter<GenericParamId, Error> + SemanticRewriter<ImplImplId, Error> + SemanticRewriter<UninferredGeneratedImplId, Error>, Error> SemanticObject<T, Error> for UninferredImpl

source§

impl<T: SemanticRewriter<ImplFunctionId, Error> + SemanticRewriter<TraitFunctionId, Error>, Error> SemanticObject<T, Error> for ImplFunctionBodyId

source§

impl<T: SemanticRewriter<LocalVarId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for LocalVariable

source§

impl<T: SemanticRewriter<MemberId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for Member

source§

impl<T: SemanticRewriter<StructId, Error> + SemanticRewriter<Vec<GenericArgumentId>, Error>, Error> SemanticObject<T, Error> for ConcreteStructLongId

source§

impl<T: SemanticRewriter<TraitId, Error> + SemanticRewriter<Vec<GenericArgumentId>, Error>, Error> SemanticObject<T, Error> for ConcreteTraitLongId

source§

impl<T: SemanticRewriter<OrderedHashMap<TraitTypeId, TypeId>, Error>, Error> SemanticObject<T, Error> for GeneratedImplItems

source§

impl<T: SemanticRewriter<ExprId, Error> + SemanticRewriter<ConcreteVariant, Error>, Error> SemanticObject<T, Error> for ExprPropagateError

source§

impl<T: SemanticRewriter<ExprId, Error> + SemanticRewriter<ConcreteStructId, Error> + SemanticRewriter<MemberId, Error> + SemanticRewriter<TypeId, Error> + SemanticRewriter<Option<ExprVarMemberPath>, Error>, Error> SemanticObject<T, Error> for ExprMemberAccess

source§

impl<T: SemanticRewriter<ExprId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprDesnap

source§

impl<T: SemanticRewriter<ExprId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprLogicalOperator

source§

impl<T: SemanticRewriter<ExprId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprLoop

source§

impl<T: SemanticRewriter<ExprId, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprSnapshot

source§

impl<T: SemanticRewriter<ExprId, Error> + SemanticRewriter<Vec<MatchArm>, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprMatch

source§

impl<T: SemanticRewriter<ExprId, Error> + SemanticRewriter<Vec<ParamId>, Error> + SemanticRewriter<TypeId, Error>, Error> SemanticObject<T, Error> for ExprClosure

source§

impl<T: SemanticRewriter<ExprId, Error> + SemanticRewriter<Vec<PatternId>, Error>, Error> SemanticObject<T, Error> for Condition

source§

impl<T: SemanticRewriter<ExprId, Error>, Error> SemanticObject<T, Error> for StatementExpr

source§

impl<T: SemanticRewriter<PatternId, Error> + SemanticRewriter<ExprId, Error>, Error> SemanticObject<T, Error> for StatementLet