pub struct FrontendLookup {
pub instance_ids: FxHashMap<InstancePath, InstanceId>,
pub instance_module: FxHashMap<InstanceId, ModuleId>,
pub indexed_instances: FxHashSet<InstanceId>,
pub module_variables: FxHashMap<ModuleId, FxHashMap<SourceVarId, VariableInfo>>,
pub module_var_path_index: FxHashMap<ModuleId, FxHashMap<Vec<String>, Option<SourceVarId>>>,
pub module_names: FxHashMap<ModuleId, String>,
pub source_to_state: FxHashMap<SourceAddr, StateAddr>,
pub state_to_source: FxHashMap<StateAddr, SourceAddr>,
pub event_aliases: FxHashMap<StateAddr, StateAddr>,
}Expand description
Source-language-independent lookup retained for diagnostics and public paths.
Parser-native IDs are projected into SourceVarId before this artifact is
built and do not cross into runtime metadata.
Fields§
§instance_ids: FxHashMap<InstancePath, InstanceId>§instance_module: FxHashMap<InstanceId, ModuleId>§indexed_instances: FxHashSet<InstanceId>Elaborated children whose source-facing name requires an index.
module_variables: FxHashMap<ModuleId, FxHashMap<SourceVarId, VariableInfo>>§module_var_path_index: FxHashMap<ModuleId, FxHashMap<Vec<String>, Option<SourceVarId>>>Reverse index from source path to source variable ID. None marks a
path that is ambiguous within the module.
module_names: FxHashMap<ModuleId, String>§source_to_state: FxHashMap<SourceAddr, StateAddr>Bidirectional boundary map between frontend source identities and the dense source-independent state identities consumed by later phases.
state_to_source: FxHashMap<StateAddr, SourceAddr>§event_aliases: FxHashMap<StateAddr, StateAddr>Event aliases projected to the canonical runtime event domain.
Implementations§
Source§impl FrontendLookup
impl FrontendLookup
pub fn instance_path_segments(&self, path: &InstancePath) -> Vec<String>
pub fn root_instance_and_module(&self) -> Option<(InstanceId, ModuleId)>
pub fn root_variable( &self, var_id: SourceVarId, ) -> Option<(StateAddr, &VariableInfo)>
pub fn instance_variable( &self, instance_id: InstanceId, var_id: SourceVarId, ) -> Option<(StateAddr, &VariableInfo)>
pub fn root_named_variable( &self, name: &str, ) -> Option<(StateAddr, &VariableInfo)>
pub fn get_path(&self, address: &SourceAddr) -> String
pub fn get_state_path(&self, address: &StateAddr) -> String
pub fn source_address(&self, address: &StateAddr) -> Option<SourceAddr>
pub fn state_address(&self, address: &SourceAddr) -> Option<StateAddr>
Trait Implementations§
Source§impl Clone for FrontendLookup
impl Clone for FrontendLookup
Source§fn clone(&self) -> FrontendLookup
fn clone(&self) -> FrontendLookup
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 FrontendLookup
impl Debug for FrontendLookup
Source§impl Default for FrontendLookup
impl Default for FrontendLookup
Source§fn default() -> FrontendLookup
fn default() -> FrontendLookup
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FrontendLookup
impl<'de> Deserialize<'de> for FrontendLookup
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FrontendLookup
impl RefUnwindSafe for FrontendLookup
impl Send for FrontendLookup
impl Sync for FrontendLookup
impl Unpin for FrontendLookup
impl UnsafeUnpin for FrontendLookup
impl UnwindSafe for FrontendLookup
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