bevy_reflect

Function struct_partial_eq

Source
pub fn struct_partial_eq<S: Struct>(a: &S, b: &dyn Reflect) -> Option<bool>
Expand description

Compares a Struct with a Reflect value.

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

  • b is a struct;
  • For each field in a, b contains a field with the same name and Reflect::reflect_partial_eq returns Some(true) for the two field values.

Returns None if the comparison couldn’t even be performed.