Trait ElementComparison

Source
pub trait ElementComparison {
    // Required method
    fn cmp(&self, other: &Self) -> Ordering;
}
Expand description

Element ordering trait.

Required Methods§

Source

fn cmp(&self, other: &Self) -> Ordering

Returns and Ordering between self and other.

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.

Implementations on Foreign Types§

Source§

impl ElementComparison for bool

Source§

fn cmp(&self, other: &bool) -> Ordering

Source§

impl ElementComparison for f32

Source§

fn cmp(&self, other: &f32) -> Ordering

Source§

impl ElementComparison for f64

Source§

fn cmp(&self, other: &f64) -> Ordering

Source§

impl ElementComparison for i8

Source§

fn cmp(&self, other: &i8) -> Ordering

Source§

impl ElementComparison for i16

Source§

fn cmp(&self, other: &i16) -> Ordering

Source§

impl ElementComparison for i32

Source§

fn cmp(&self, other: &i32) -> Ordering

Source§

impl ElementComparison for i64

Source§

fn cmp(&self, other: &i64) -> Ordering

Source§

impl ElementComparison for u8

Source§

fn cmp(&self, other: &u8) -> Ordering

Source§

impl ElementComparison for u16

Source§

fn cmp(&self, other: &u16) -> Ordering

Source§

impl ElementComparison for u32

Source§

fn cmp(&self, other: &u32) -> Ordering

Source§

impl ElementComparison for u64

Source§

fn cmp(&self, other: &u64) -> Ordering

Implementors§