Function bevy_reflect::enum_debug

source ·
pub fn enum_debug(dyn_enum: &dyn Enum, f: &mut Formatter<'_>) -> Result
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,
// )