Lyricdev
GitHub

interface Ordered

pub interface Ordered :: [Equatable]

Conforms to Equatable.

The operators <, <=, > and >=, which read a.compare(b).

.Less means <; null means the two are not ordered (float is partial, NaN compares with nothing), in which case every one of the four is false.

Methods

fn compare(o: Self): ?Ordering

Compares this with o; null where the two are not ordered.

Synthesized lexicographically over the fields: the first that is not .Equal decides, and an unordered field (null) is the answer; an enum by the variant's position first, then its payload.