Skip to main content

VariableRef

Type Alias VariableRef 

Source
pub type VariableRef = VariableRef<VarId, ScopeId>;

Aliased Type§

pub struct VariableRef {
    pub path: ScopeRef<ScopeId>,
    pub name: String,
    pub id: VarId,
    pub index: Option<i64>,
}

Fields§

§path: ScopeRef<ScopeId>

Path in the scope hierarchy to where this variable resides

§name: String

Name of the variable in its hierarchy

§id: VarId

Backend specific numeric ID. Performance optimization.

§index: Option<i64>

Index

Only used to point out a variable in an array of variables, not variables that are arrays themselves, so only a single index required.

Trait Implementations§

Source§

impl VariableRefExt for VariableRef

Source§

fn full_path_string_no_index(&self) -> String

A human readable full path to the variable, including scope, but no index

Source§

fn full_path_string(&self) -> String

A human readable full path to the variable, including scope and index if present

Source§

fn full_path(&self) -> Vec<String>

The full path as a vector of strings, including scope and variable name

Source§

fn full_path_with_index(&self) -> Vec<String>

The full path as a vector of strings, including scope, variable name and index if present

Source§

fn new(path: ScopeRef, name: String) -> Self

Source§

fn new_with_id_and_index( path: ScopeRef, name: String, id: VarId, index: Option<i64>, ) -> Self

Source§

fn from_hierarchy_string(s: &str) -> Self

Source§

fn from_hierarchy_string_with_id(s: &str, id: VarId) -> Self

Source§

fn from_strs(s: &[&str]) -> Self

Source§

fn clear_id(&mut self)

Source§

fn cxxrtl_repr(&self) -> String