Struct cairo_lang_semantic::expr::fmt::ExprFormatter
source · pub struct ExprFormatter<'a> {
pub db: &'a (dyn SemanticGroup + 'static),
pub function_id: FunctionWithBodyId,
}
Expand description
Holds all the information needed for formatting expressions. Acts like a “db” for DebugWithDb.
Fields§
§db: &'a (dyn SemanticGroup + 'static)
§function_id: FunctionWithBodyId
Trait Implementations§
source§impl DebugWithDb<ExprFormatter<'_>> for ExprId
impl DebugWithDb<ExprFormatter<'_>> for ExprId
source§impl DebugWithDb<ExprFormatter<'_>> for PatternId
impl DebugWithDb<ExprFormatter<'_>> for PatternId
source§impl DebugWithDb<ExprFormatter<'_>> for StatementId
impl DebugWithDb<ExprFormatter<'_>> for StatementId
source§impl DebugWithDb<ExprFormatter<'_>> for PatternVariable
impl DebugWithDb<ExprFormatter<'_>> for PatternVariable
source§impl<'a> DebugWithDb<ExprFormatter<'a>> for ExprVar
impl<'a> DebugWithDb<ExprFormatter<'a>> for ExprVar
source§impl<'a> DebugWithDb<ExprFormatter<'a>> for ExprVarMemberPath
impl<'a> DebugWithDb<ExprFormatter<'a>> for ExprVarMemberPath
source§impl<'a> Upcast<dyn DefsGroup> for ExprFormatter<'a>
impl<'a> Upcast<dyn DefsGroup> for ExprFormatter<'a>
source§impl<'a> Upcast<dyn SemanticGroup> for ExprFormatter<'a>
impl<'a> Upcast<dyn SemanticGroup> for ExprFormatter<'a>
fn upcast(&self) -> &(dyn SemanticGroup + 'static)
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ExprFormatter<'a>
impl<'a> !Send for ExprFormatter<'a>
impl<'a> !Sync for ExprFormatter<'a>
impl<'a> Unpin for ExprFormatter<'a>
impl<'a> !UnwindSafe for ExprFormatter<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Elongate for Twhere
T: Upcast<dyn SemanticGroup>,
impl<T> Elongate for Twhere
T: Upcast<dyn SemanticGroup>,
fn elongate(&self) -> &(dyn SemanticGroup + 'static)
source§impl<'a, T> SemanticEnumEx<'a> for T
impl<'a, T> SemanticEnumEx<'a> for T
source§fn concrete_enum_variant(
&self,
concrete_enum_id: ConcreteEnumId,
variant: &Variant
) -> Maybe<ConcreteVariant>
fn concrete_enum_variant( &self, concrete_enum_id: ConcreteEnumId, variant: &Variant ) -> Maybe<ConcreteVariant>
source§fn concrete_enum_variants(
&self,
concrete_enum_id: ConcreteEnumId
) -> Maybe<Vec<ConcreteVariant>>
fn concrete_enum_variants( &self, concrete_enum_id: ConcreteEnumId ) -> Maybe<Vec<ConcreteVariant>>
Retrieves all the ConcreteVariants for a ConcreteEnumId.
source§impl<'a, T> SemanticExprLookup<'a> for T
impl<'a, T> SemanticExprLookup<'a> for T
fn lookup_expr_by_ptr( &self, function_id: FunctionWithBodyId, ptr: ExprPtr ) -> Maybe<ExprId>
fn lookup_pattern_by_ptr( &self, function_id: FunctionWithBodyId, ptr: PatternPtr ) -> Maybe<PatternId>
source§impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere
TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,
impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere
TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,
source§impl<T, E, TRewriter> SemanticRewriter<Box<T>, E> for TRewriterwhere
T: Clone,
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Box<T>, E> for TRewriterwhere
T: Clone,
TRewriter: SemanticRewriter<T, E>,
source§impl<K, V, E, TRewriter> SemanticRewriter<HashMap<K, V>, E> for TRewriter
impl<K, V, E, TRewriter> SemanticRewriter<HashMap<K, V>, E> for TRewriter
source§impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
source§impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
source§impl<T, E, TRewriter> SemanticRewriter<Vec<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Vec<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
source§impl<T, E, TRewriter> SemanticRewriter<VecDeque<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<VecDeque<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
source§impl<'a, T> SemanticStructEx<'a> for T
impl<'a, T> SemanticStructEx<'a> for T
fn concrete_struct_members( &self, concrete_struct_id: ConcreteStructId ) -> Maybe<OrderedHashMap<SmolStr, Member>>
source§impl<'a, T> SemanticUseEx<'a> for T
impl<'a, T> SemanticUseEx<'a> for T
source§fn use_resolved_item(&self, use_id: UseId) -> Maybe<ResolvedGenericItem>
fn use_resolved_item(&self, use_id: UseId) -> Maybe<ResolvedGenericItem>
Returns the resolved item or an error if it can’t be resolved. Read more