CondCode

Trait CondCode 

Source
pub trait CondCode: Copy {
    // Required methods
    fn inverse(self) -> Self;
    fn reverse(self) -> Self;
}
Expand description

Common traits of condition codes.

Required Methods§

Source

fn inverse(self) -> Self

Get the inverse condition code of self.

The inverse condition code produces the opposite result for all comparisons. That is, cmp CC, x, y is true if and only if cmp CC.inverse(), x, y is false.

Source

fn reverse(self) -> Self

Get the reversed condition code for self.

The reversed condition code produces the same result as swapping x and y in the comparison. That is, cmp CC, x, y is the same as cmp CC.reverse(), y, x.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§