polars_utils::total_ord

Trait ToTotalOrd

Source
pub trait ToTotalOrd {
    type TotalOrdItem: Hash + Eq;
    type SourceItem;

    // Required methods
    fn to_total_ord(&self) -> Self::TotalOrdItem;
    fn peel_total_ord(ord_item: Self::TotalOrdItem) -> Self::SourceItem;
}
Expand description

This elides creating a TotalOrdWrap for types that don’t need it.

Required Associated Types§

Required Methods§

Source

fn to_total_ord(&self) -> Self::TotalOrdItem

Source

fn peel_total_ord(ord_item: Self::TotalOrdItem) -> Self::SourceItem

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 ToTotalOrd for bool

Source§

impl ToTotalOrd for char

Source§

impl ToTotalOrd for f32

Source§

impl ToTotalOrd for f64

Source§

impl ToTotalOrd for i8

Source§

impl ToTotalOrd for i16

Source§

impl ToTotalOrd for i32

Source§

impl ToTotalOrd for i64

Source§

impl ToTotalOrd for i128

Source§

impl ToTotalOrd for isize

Source§

impl ToTotalOrd for u8

Source§

impl ToTotalOrd for u16

Source§

impl ToTotalOrd for u32

Source§

impl ToTotalOrd for u64

Source§

impl ToTotalOrd for u128

Source§

impl ToTotalOrd for usize

Source§

impl ToTotalOrd for String

Source§

impl<'a> ToTotalOrd for &'a str

Source§

impl<'a> ToTotalOrd for &'a [u8]

Source§

type TotalOrdItem = &'a [u8]

Source§

type SourceItem = &'a [u8]

Source§

fn to_total_ord(&self) -> Self::TotalOrdItem

Source§

fn peel_total_ord(ord_item: Self::TotalOrdItem) -> Self::SourceItem

Source§

impl<T: Copy + TotalEq + TotalHash> ToTotalOrd for Option<T>

This is safe without needing to map the option value to TotalOrdWrap, since for example: TotalOrdWrap<Option<T>> implements Eq + Hash, iff: Option<T> implements TotalEq + TotalHash, iff: T implements TotalEq + TotalHash

Source§

impl<T: ToTotalOrd> ToTotalOrd for &T

Implementors§