SymbolsTableTrait

Trait SymbolsTableTrait 

Source
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§

Source

fn expression_symbol(&self) -> Vec<(&Symbol, &ValueAndSource)>

Return the symbols that correspond to integer values

Source

fn is_used<S>(&self, symbol: S) -> bool
where Symbol: From<S>, S: AsRef<str>,

Return true if the symbol has already been used in an expression

Source

fn use_symbol<S>(&mut self, symbol: S)
where Symbol: From<S>, S: AsRef<str>,

Add a symbol to the list of used symbols

Source

fn int_value<S>(&self, symbol: S) -> Result<Option<i32>, SymbolError>
where Symbol: From<S>, S: AsRef<str>,

Return the integer value corredponding to this symbol (if any)

Source

fn any_value<S>( &self, symbol: S, ) -> Result<Option<&ValueAndSource>, SymbolError>
where Symbol: From<S>, S: AsRef<str>,

Source

fn counter_value<S>(&self, symbol: S) -> Result<Option<i32>, SymbolError>
where Symbol: From<S>, S: AsRef<str>,

Source

fn macro_value<S>(&self, symbol: S) -> Result<Option<&Macro>, SymbolError>
where Symbol: From<S>, S: AsRef<str>,

Source

fn struct_value<S>(&self, symbol: S) -> Result<Option<&Struct>, SymbolError>
where Symbol: From<S>, S: AsRef<str>,

Source

fn address_value<S>( &self, symbol: S, ) -> Result<Option<&PhysicalAddress>, SymbolError>
where Symbol: From<S>, S: AsRef<str>,

Source

fn remove_symbol<S>( &mut self, symbol: S, ) -> Result<Option<ValueAndSource>, SymbolError>
where Symbol: From<S>, S: AsRef<str>,

Source

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>,

Source

fn enter_namespace(&mut self, namespace: &str)

Source

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.

Implementors§