Function il2_iltags::tags::util::iltag_are_equal[][src]

pub fn iltag_are_equal(a: &dyn ILTag, b: &dyn ILTag) -> bool
Expand description

This function compares ILTag instances by serializing them and compare if the serialization matches.

This is, by far, the least efficient way to perform the comparison between tags but it is guaranteed to work for all situations, including those when the same tag is implemented by distinct structs.

Arguments:

  • a: ILTag A;
  • b: ILTag B;

Returns:

  • true if the tags are equal or false otherwise or in case the comparison cannot be performed (due to errors in the serialization).