pub trait SymbolsTableTrait {
Show 13 methods
// Required methods
fn expression_symbol(&self) -> Vec<(&Symbol, &ValueAndSource)>;
fn is_used<S>(&self, symbol: S) -> bool
where Symbol: From<S>,
S: AsRef<str>;
fn use_symbol<S>(&mut self, symbol: S)
where Symbol: From<S>,
S: AsRef<str>;
fn int_value<S>(&self, symbol: S) -> Result<Option<i32>, SymbolError>
where Symbol: From<S>,
S: AsRef<str>;
fn any_value<S>(
&self,
symbol: S,
) -> Result<Option<&ValueAndSource>, SymbolError>
where Symbol: From<S>,
S: AsRef<str>;
fn counter_value<S>(&self, symbol: S) -> Result<Option<i32>, SymbolError>
where Symbol: From<S>,
S: AsRef<str>;
fn macro_value<S>(&self, symbol: S) -> Result<Option<&Macro>, SymbolError>
where Symbol: From<S>,
S: AsRef<str>;
fn struct_value<S>(&self, symbol: S) -> Result<Option<&Struct>, SymbolError>
where Symbol: From<S>,
S: AsRef<str>;
fn address_value<S>(
&self,
symbol: S,
) -> Result<Option<&PhysicalAddress>, SymbolError>
where Symbol: From<S>,
S: AsRef<str>;
fn remove_symbol<S>(
&mut self,
symbol: S,
) -> Result<Option<ValueAndSource>, SymbolError>
where Symbol: From<S>,
S: AsRef<str>;
fn assign_symbol_to_value<S, V>(
&mut self,
symbol: S,
value: V,
) -> Result<Option<ValueAndSource>, SymbolError>
where V: Into<ValueAndSource>,
Symbol: From<S>,
S: AsRef<str>;
fn enter_namespace(&mut self, namespace: &str);
fn leave_namespace(&mut self) -> Result<Symbol, SymbolError>;
}Expand description
Public signature of symbols functions TODO add all the other methods
Required Methods§
Sourcefn expression_symbol(&self) -> Vec<(&Symbol, &ValueAndSource)>
fn expression_symbol(&self) -> Vec<(&Symbol, &ValueAndSource)>
Return the symbols that correspond to integer values
Sourcefn is_used<S>(&self, symbol: S) -> bool
fn is_used<S>(&self, symbol: S) -> bool
Return true if the symbol has already been used in an expression
Sourcefn use_symbol<S>(&mut self, symbol: S)
fn use_symbol<S>(&mut self, symbol: S)
Add a symbol to the list of used symbols
Sourcefn int_value<S>(&self, symbol: S) -> Result<Option<i32>, SymbolError>
fn int_value<S>(&self, symbol: S) -> Result<Option<i32>, SymbolError>
Return the integer value corredponding to this symbol (if any)
fn any_value<S>( &self, symbol: S, ) -> Result<Option<&ValueAndSource>, SymbolError>
fn counter_value<S>(&self, symbol: S) -> Result<Option<i32>, SymbolError>
fn macro_value<S>(&self, symbol: S) -> Result<Option<&Macro>, SymbolError>
fn struct_value<S>(&self, symbol: S) -> Result<Option<&Struct>, SymbolError>
fn address_value<S>( &self, symbol: S, ) -> Result<Option<&PhysicalAddress>, SymbolError>
fn remove_symbol<S>( &mut self, symbol: S, ) -> Result<Option<ValueAndSource>, SymbolError>
fn assign_symbol_to_value<S, V>( &mut self, symbol: S, value: V, ) -> Result<Option<ValueAndSource>, SymbolError>
fn enter_namespace(&mut self, namespace: &str)
fn leave_namespace(&mut self) -> Result<Symbol, SymbolError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.