pub struct ExpressionStore {
expr_only: Option<Box<ExpressionOnlyStore>>,
pub types: Arena<TypeRef>,
pub lifetimes: Arena<LifetimeRef>,
}Fields§
§expr_only: Option<Box<ExpressionOnlyStore>>§types: Arena<TypeRef>§lifetimes: Arena<LifetimeRef>Implementations§
Source§impl ExpressionStore
impl ExpressionStore
const EMPTY: &ExpressionStore
pub fn empty() -> &'static ExpressionStore
pub fn of( db: &dyn SourceDatabase, def: ExpressionStoreOwnerId, ) -> &ExpressionStore
pub fn with_source_map( db: &dyn SourceDatabase, def: ExpressionStoreOwnerId, ) -> (&ExpressionStore, &ExpressionStoreSourceMap)
Sourcepub fn expr_roots(&self) -> impl DoubleEndedIterator<Item = ExprId>
pub fn expr_roots(&self) -> impl DoubleEndedIterator<Item = ExprId>
Returns all expression root ExprIds found in this store.
fn find_root_for( &self, get: impl FnMut(&ExprRoot) -> RawIdx, find: RawIdx, ) -> ExprId
pub fn find_root_for_expr(&self, expr: ExprId) -> ExprId
pub fn find_root_for_pat(&self, pat: PatId) -> ExprId
pub fn find_root_for_binding(&self, binding: BindingId) -> ExprId
Sourcepub fn blocks<'a>(
&'a self,
db: &'a dyn SourceDatabase,
) -> impl Iterator<Item = (BlockId, &'a DefMap)> + 'a
pub fn blocks<'a>( &'a self, db: &'a dyn SourceDatabase, ) -> impl Iterator<Item = (BlockId, &'a DefMap)> + 'a
Returns an iterator over all block expressions in this store that define inner items.
pub fn walk_bindings_in_pat(&self, pat_id: PatId, f: impl FnMut(BindingId))
pub fn visit_pat_children(&self, pat_id: PatId, visitor: impl StoreVisitor)
pub fn walk_pats_shallow(&self, pat_id: PatId, f: impl FnMut(PatId))
pub fn walk_pats(&self, pat_id: PatId, f: &mut impl FnMut(PatId))
pub fn binding_owner(&self, id: BindingId) -> Option<ExprId>
pub fn visit_expr_children(&self, expr_id: ExprId, visitor: impl StoreVisitor)
Sourcepub fn walk_child_exprs(&self, expr_id: ExprId, callback: impl FnMut(ExprId))
pub fn walk_child_exprs(&self, expr_id: ExprId, callback: impl FnMut(ExprId))
Walks the immediate children expressions and calls f for each child expression.
Sourcepub fn walk_child_exprs_without_pats(
&self,
expr_id: ExprId,
callback: impl FnMut(ExprId),
)
pub fn walk_child_exprs_without_pats( &self, expr_id: ExprId, callback: impl FnMut(ExprId), )
Walks the immediate children expressions and calls f for each child expression but does
not walk expressions within patterns.
pub fn walk_exprs_in_pat(&self, pat_id: PatId, callback: impl FnMut(ExprId))
pub fn visit_type_ref_children( &self, type_ref: TypeRefId, visitor: impl StoreVisitor, )
fn assert_expr_only(&self) -> &ExpressionOnlyStore
fn binding_hygiene(&self, binding: BindingId) -> HygieneId
pub fn expr_path_hygiene(&self, expr: ExprId) -> HygieneId
pub fn pat_path_hygiene(&self, pat: PatId) -> HygieneId
pub fn expr_or_pat_path_hygiene(&self, id: ExprOrPatId) -> HygieneId
pub fn exprs(&self) -> impl Iterator<Item = (ExprId, &Expr)>
pub fn pats(&self) -> impl Iterator<Item = (PatId, &Pat)>
pub fn bindings(&self) -> impl Iterator<Item = (BindingId, &Binding)>
Sourcepub fn coroutine_for_closure(coroutine_closure: ExprId) -> ExprId
pub fn coroutine_for_closure(coroutine_closure: ExprId) -> ExprId
The coroutine associated with a coroutine closure.
Sourcepub fn closure_for_coroutine(coroutine: ExprId) -> ExprId
pub fn closure_for_coroutine(coroutine: ExprId) -> ExprId
The opposite of Self::coroutine_for_closure().
Trait Implementations§
Source§impl Clone for ExpressionStore
impl Clone for ExpressionStore
Source§fn clone(&self) -> ExpressionStore
fn clone(&self) -> ExpressionStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExpressionStore
impl Debug for ExpressionStore
impl Eq for ExpressionStore
Source§impl Index<Idx<Binding>> for ExpressionStore
impl Index<Idx<Binding>> for ExpressionStore
Source§impl Index<Idx<Expr>> for ExpressionStore
impl Index<Idx<Expr>> for ExpressionStore
Source§impl Index<Idx<Label>> for ExpressionStore
impl Index<Idx<Label>> for ExpressionStore
Source§impl Index<Idx<LifetimeRef>> for ExpressionStore
impl Index<Idx<LifetimeRef>> for ExpressionStore
Source§type Output = LifetimeRef
type Output = LifetimeRef
The returned type after indexing.
Source§fn index(&self, b: LifetimeRefId) -> &LifetimeRef
fn index(&self, b: LifetimeRefId) -> &LifetimeRef
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<Idx<Pat>> for ExpressionStore
impl Index<Idx<Pat>> for ExpressionStore
Source§impl Index<Idx<TypeRef>> for ExpressionStore
impl Index<Idx<TypeRef>> for ExpressionStore
Source§impl Index<PathId> for ExpressionStore
impl Index<PathId> for ExpressionStore
Source§impl PartialEq for ExpressionStore
impl PartialEq for ExpressionStore
impl StructuralPartialEq for ExpressionStore
Auto Trait Implementations§
impl Freeze for ExpressionStore
impl RefUnwindSafe for ExpressionStore
impl Send for ExpressionStore
impl Sync for ExpressionStore
impl Unpin for ExpressionStore
impl UnsafeUnpin for ExpressionStore
impl UnwindSafe for ExpressionStore
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more