Struct gluon_base::symbol::SymbolModule [] [src]

pub struct SymbolModule<'a> { /* fields omitted */ }

SymbolModule wraps a Symbols struct and adds a prefix to all symbols created by the symbol method. While this prefix does not affect the uniques of a Symbol in any way, it does make the origin of a symbol clearer when pretty printing it

Methods

impl<'a> SymbolModule<'a>
[src]

[src]

[src]

Creates an unprefixed symbol, same as Symbols::symbol

[src]

Creates a symbol which is prefixed by the module argument passed in new

let mut symbols = Symbols::new();
let mut symbols = SymbolModule::new(String::from("test"), &mut symbols);
assert_eq!(symbols.symbol("a").as_ref(), "a");
assert_eq!(symbols.scoped_symbol("a").as_ref(), "test.a");

[src]

[src]

Trait Implementations

impl<'a> Debug for SymbolModule<'a>
[src]

[src]

Formats the value using the given formatter.

impl<'s> DisplayEnv for SymbolModule<'s>
[src]

[src]

impl<'a> IdentEnv for SymbolModule<'a>
[src]

[src]