The PartialEq automatic code is probably straightforward and performs array member equality/inequality sequential tests, but the PartialOrd is different, and I just can't figure out how comparison is handled in automatic code. Are there any documentation on how this code is generated, and on which types those derivations can be applied ?
Thanks !
[As for my previous posts, this is a learning purpose project.]
The derived code compares the first field in the struct, and breaks ties by comparing the second, and then the third, etc. This is called lexicographic ordering.
Tuples, vectors, and arrays use the same scheme, but arrays have to have 32 elements or less due to a technical limitation in the compiler.