Skip to main content

ORDERING_VARIANTS

Constant ORDERING_VARIANTS 

Source
pub const ORDERING_VARIANTS: &[&str];
Expand description

The three variants of the prelude Ordering enum (core.compare), in the order the comparison ladder produces them.

Ordering is the return type of Comparable.compare, so the primitive bridge constructs one of these per comparison. When the core.compare enum declaration is not among the reached modules, each backend lowers Ordering/Less/Equal/Greater to a self-contained representation (Rust’s native std::cmp::Ordering, a tagged object in JS/TS, a runtime singleton in Python/Go) — the same treatment the built-in Optional/ Result receive.