Macro strflags::str_enum

source ·
macro_rules! str_enum {
    ($name: ident : [$($fields: ident),* $(,)?]) => { ... };
}
Expand description

Construct a string enum.

This struct stores all its data in flatlowercase to avoid some typos.

Currently we use EcoString which can only inline 15 bytes. Having a larger compile time constant string is a runtime error if the constant is USED.

However loading a larger string at runtime is fine.

This behavior will be changed in the future.