pub struct SemanticLoweringMapping {
pub captured: UnorderedHashMap<MemberPath, VariableId>,
pub copiable_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.
copiable_captured: UnorderedHashMap<MemberPath, VariableId>
Maps captured member paths which are copiable 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§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