bevy_reflect

Function tuple_struct_partial_eq

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

Compares a TupleStruct with a Reflect value.

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

  • b is a tuple struct;
  • b has the same number of fields as a;
  • Reflect::reflect_partial_eq returns Some(true) for pairwise fields of a and b.

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