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

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

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

Implementations

Creates an unprefixed symbol, same as Symbols::symbol

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.simple_symbol("a").as_ref(), "a");
assert_eq!(symbols.scoped_symbol("a").as_ref(), "test.a");

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.