pub struct Usage {
pub usage: OrderedHashMap<MemberPath, ExprVarMemberPath>,
pub changes: OrderedHashMap<MemberPath, ExprVarMemberPath>,
pub snap_usage: OrderedHashMap<MemberPath, ExprVarMemberPath>,
pub introductions: OrderedHashSet<VarId>,
}
Expand description
Usages of variables and member paths in semantic code.
Fields§
§usage: OrderedHashMap<MemberPath, ExprVarMemberPath>
Member paths that are read.
changes: OrderedHashMap<MemberPath, ExprVarMemberPath>
Member paths that are assigned to.
snap_usage: OrderedHashMap<MemberPath, ExprVarMemberPath>
Member paths that are read as snapshots.
introductions: OrderedHashSet<VarId>
Variables that are defined.
Implementations§
source§impl Usage
impl Usage
sourcepub fn add_usage_and_changes(&mut self, usage: &Usage)
pub fn add_usage_and_changes(&mut self, usage: &Usage)
Adds the usage and changes from ‘usage’ to self, Ignoring introductions
.
sourcepub fn finalize_as_scope(&mut self)
pub fn finalize_as_scope(&mut self)
Removes usage that was introduced current block and usage that is already covered by containing variables.
Trait Implementations§
source§impl<'a, T: ?Sized + Upcast<ExprFormatter<'a>>> DebugWithDb<T> for Usage
impl<'a, T: ?Sized + Upcast<ExprFormatter<'a>>> DebugWithDb<T> for Usage
Auto Trait Implementations§
impl Freeze for Usage
impl RefUnwindSafe for Usage
impl Send for Usage
impl Sync for Usage
impl Unpin for Usage
impl UnwindSafe for Usage
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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