pub struct SemanticLoweringMapping {
pub captured: UnorderedHashMap<MemberPath, VariableId>,
pub closures: UnorderedHashMap<VariableId, ClosureInfo>,
/* private fields */
}
Fields§
§captured: UnorderedHashMap<MemberPath, VariableId>
Maps captured member paths to a clusure that captured them.
closures: UnorderedHashMap<VariableId, ClosureInfo>
Maps the variable id of a closure to the closure info.
Implementations§
Source§impl SemanticLoweringMapping
impl SemanticLoweringMapping
Sourcepub fn topmost_mapped_containing_member_path(
&mut self,
member_path: MemberPath,
) -> Option<MemberPath>
pub fn topmost_mapped_containing_member_path( &mut self, member_path: MemberPath, ) -> Option<MemberPath>
Returns the topmost mapped member path containing the given member path, or None no such member path exists in the mapping.
Sourcepub fn get_scattered_members(
&mut self,
member_path: &MemberPath,
) -> Option<Vec<MemberPath>>
pub fn get_scattered_members( &mut self, member_path: &MemberPath, ) -> Option<Vec<MemberPath>>
Returns the scattered members of the given member path, or None if the member path is not scattered.
pub fn destructure_closure<TContext: StructRecomposer>( &mut self, ctx: &mut TContext, closure_var: VariableId, closure_info: &ClosureInfo, ) -> Vec<VariableId>
pub fn invalidate_closure<TContext: StructRecomposer>( &mut self, ctx: &mut TContext, closure_var: VariableId, )
pub fn get<TContext: StructRecomposer>( &mut self, ctx: TContext, path: &MemberPath, ) -> Option<VariableId>
pub fn introduce(&mut self, path: MemberPath, var: VariableId)
pub fn update<TContext: StructRecomposer>( &mut self, ctx: &mut TContext, path: &MemberPath, var: VariableId, ) -> Option<()>
Trait Implementations§
Source§impl Clone for SemanticLoweringMapping
impl Clone for SemanticLoweringMapping
Source§fn clone(&self) -> SemanticLoweringMapping
fn clone(&self) -> SemanticLoweringMapping
Returns a copy of the value. Read more
1.0.0 · 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 SemanticLoweringMapping
impl Debug for SemanticLoweringMapping
Source§impl Default for SemanticLoweringMapping
impl Default for SemanticLoweringMapping
Source§fn default() -> SemanticLoweringMapping
fn default() -> SemanticLoweringMapping
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SemanticLoweringMapping
impl RefUnwindSafe for SemanticLoweringMapping
impl Send for SemanticLoweringMapping
impl Sync for SemanticLoweringMapping
impl Unpin for SemanticLoweringMapping
impl UnwindSafe for SemanticLoweringMapping
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§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