re_types::reflection

Trait Enum

Source
pub trait Enum:
    Sized
    + Copy
    + Clone
    + Hash
    + PartialEq
    + Eq
    + Display
    + 'static {
    // Required methods
    fn variants() -> &'static [Self];
    fn docstring_md(self) -> &'static str;
}
Expand description

A trait for code-generated enums.

Required Methods§

Source

fn variants() -> &'static [Self]

All variants, in the order they appear in the enum.

Source

fn docstring_md(self) -> &'static str

Markdown docstring for the given enum variant.

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§