R

Ravina • 3.96K Points
Extraordinary

Q. Which trait should be implemented to allow a custom struct to be compared using < and >?

  • (A) PartialEq
  • (B) PartialOrd
  • (C) Ord
  • (D) Eq
  • Correct Answer - Option(B)
  • Views: 21
  • Filed under category Rust
  • Hashtags:

Explanation by: Ravina

PartialOrd enables comparison using <, >, <=, and >=.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.