Symbol!() { /* proc-macro */ }Expand description
The Symbol! macro is used to create a type-level string through the string literal
given to the macro.
The macro constructs the type-level string through a chain of Char types and
terminated with the Nil type. In other words, it constructs a type-level list
of characters to represent them as a type-level string.
Read more about type-level strings in the documentation for Char.
§Example
Given the following symbol definition:
ⓘ
type Hello = Symbol!("hello");The following type would be generated:
ⓘ
type Hello = Char<'h', Char<'e', Char<'l', Char<'l', Char<'o', Nil>>>>>;which would be shown with the shortened representation as:
ⓘ
type Hello = ζ<'h', ζ<'e', ζ<'l', ζ<'l', ζ<'o', ε>>>>>;