Skip to main content

VariantOrder

Trait VariantOrder 

Source
pub trait VariantOrder {
    // Required method
    fn order() -> &'static [&'static str];
}
Expand description

Trait for getting the canonical ordering of an enum’s variants.

Required Methods§

Source

fn order() -> &'static [&'static str]

Returns the variant names of the enum in order.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§