Skip to main content

enum_default_literal

Function enum_default_literal 

Source
pub const fn enum_default_literal<T: SQLEnumVariants>(
    label: &str,
) -> &'static str
Expand description

The SQL literal of T’s variant label as a column DEFAULT, from SQLEnumVariants::DEFAULT_LITERALS.

The table macros call this in a const context, so a default that names no variant fails to compile.

§Panics

When label is not a variant of T.