Skip to main content

Module mangler

Module mangler 

Source
Expand description

Mangler trait and implementations.

Structs§

CacheMangler
A mangler that remembers and can unmangle.
EscapeMangler
A mangler that replaces :: with _ and prefixes components with the number of _ they contain. e.g. foo::bar_baz item => foo__1bar_baz_item
HashMangler
A mangler that hashes the module path. e.g. foo::bar::baz item => item_32938483840293402930392
NoMangler
A mangler that just returns the identifier as-is (no mangling). e.g. foo::bar::baz item => item
UnicodeMangler
A mangler that uses cryptic unicode symbols that look like :, < and > e.g. foo::bar::baz array<f32,2> => foo::bar::baz::arrayᐸf32ˏ2ᐳ

Traits§

Mangler
A name mangler is responsible for renaming import-qualified identifiers into valid WGSL identifiers.