pub fn enum_debug(
    dyn_enum: &(dyn Enum + 'static),
    f: &mut Formatter<'_>
) -> Result<(), Error>
Expand description

The default debug formatter for Enum types.

Example

use bevy_reflect::Reflect;
#[derive(Reflect)]
enum MyEnum {
  A,
  B (usize),
  C {value: i32}
}

let my_enum: &dyn Reflect = &MyEnum::B(123);
println!("{:#?}", my_enum);

// Output:

// B (
//   123,
// )