pub struct VariableNameInfo {
pub true_name: Option<TrueName>,
pub priority: Option<i32>,
}
Expand description
Provides a way for translators to “change” the name of variables in the variable list. Most translators should not produce VariableNameInfo since it is a global thing that is done on all variables, not just those which have had the translator applied.
An example use case is translators for HDLs which want to translate from automatically generated subexpression back into names that a human can understand. In this use case, it is very unlikely that the user wants to see the raw anonymous name that the compiler emitted, so performing this translation globally makes sense.
Fields§
§true_name: Option<TrueName>
A more human-undesrstandable name for a signal. This should only be used by translators which
priority: Option<i32>
Translators can change the order that signals appear in the variable list using this parameter. Before rendering, the variable will be sported by this number in descending order, so variables that are predicted to be extra important to the user should have a number > 0 while unimportant variables should be < 0
Translators should only poke at this variable if they know something about the variable. For example, an HDL translator that does not recognise a name should leave it at None to give other translators the chance to set the priority
Trait Implementations§
Source§impl Clone for VariableNameInfo
impl Clone for VariableNameInfo
Source§fn clone(&self) -> VariableNameInfo
fn clone(&self) -> VariableNameInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more