Skip to main content

PartialOrd

Trait PartialOrd 

Source
pub trait PartialOrd { }
Expand description

PartialOrd recognized by the arcis interpreter.

§Implementing

PartialOrd is currently neither derivable nor implementable inside #[encrypted] code. #[derive(PartialOrd)] and a hand-written impl PartialOrd for MyType are both rejected. This will be revisited in a future PR.

If you need custom ordering today, you can compare specific fields with the operators below, or wrap a sortable value in a newtype and use that directly in comparisons.

§Calling

Inside #[encrypted] code, the only supported surface is the comparison operators on the primitive types listed below:

  • a < b, a <= b, a > b, a >= b.

The trait methods themselves — .partial_cmp(), .lt(), .le(), .gt(), .ge() — are not accepted. Ordering is not a supported type in #[encrypted] code.

§Implementors

The impl list below shows the types the interpreter recognizes for the comparison operators. Tuples, arrays, references, and other composites that implement PartialOrd in std are deliberately absent here — the interpreter does not accept </<=/>/>= on them.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§