bevy_reflect

Function enum_partial_eq

Source
pub fn enum_partial_eq<TEnum: Enum + ?Sized>(
    a: &TEnum,
    b: &dyn PartialReflect,
) -> Option<bool>
Expand description

Compares an Enum with a PartialReflect value.

Returns true if and only if all of the following are true:

  • b is an enum;
  • b is the same variant as a;
  • For each field in a, b contains a field with the same name and PartialReflect::reflect_partial_eq returns Some(true) for the two field values.