konst::cmp

Struct CmpWrapper

Source
pub struct CmpWrapper<T>(pub T);
Expand description

A wrapper type for std types, which defines const_eq and const_cmp methods for them.

This is what coerce_to_cmp and the comparison macros convert standard library types into.

§Example

use konst::{
    cmp::CmpWrapper,
    coerce_to_cmp,
};

use std::cmp::Ordering;

{
    // The `CmpWrapper<u32>` type annotation is just for the reader
    let foo: CmpWrapper<u32> = coerce_to_cmp!(10u32);
    assert!( foo.const_eq(&10));
    assert!(!foo.const_eq(&20));
     
    assert_eq!(foo.const_cmp(&5), Ordering::Greater);
    assert_eq!(foo.const_cmp(&10), Ordering::Equal);
    assert_eq!(foo.const_cmp(&15), Ordering::Less);
}
{
    let bar = CmpWrapper(Ordering::Equal);
    assert!( bar.const_eq(&Ordering::Equal));
    assert!(!bar.const_eq(&Ordering::Less));
     
    assert_eq!(bar.const_cmp(&Ordering::Less), Ordering::Greater);
    assert_eq!(bar.const_cmp(&Ordering::Equal), Ordering::Equal);
    assert_eq!(bar.const_cmp(&Ordering::Greater), Ordering::Less);
}

Tuple Fields§

§0: T

Implementations§

Source§

impl<'a, T> CmpWrapper<&'a [T]>

Source

pub const fn slice(x: &'a [T]) -> Self

For constructing from a reference to an array.

With slices you can do CmpWrapper(slice) as well.

Source§

impl CmpWrapper<i8>

Source

pub const fn const_eq(self, other: &i8) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<u8>

Source

pub const fn const_eq(self, other: &u8) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<i16>

Source

pub const fn const_eq(self, other: &i16) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<u16>

Source

pub const fn const_eq(self, other: &u16) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<i32>

Source

pub const fn const_eq(self, other: &i32) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<u32>

Source

pub const fn const_eq(self, other: &u32) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<i64>

Source

pub const fn const_eq(self, other: &i64) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<u64>

Source

pub const fn const_eq(self, other: &u64) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<i128>

Source

pub const fn const_eq(self, other: &i128) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<u128>

Source

pub const fn const_eq(self, other: &u128) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<isize>

Source

pub const fn const_eq(self, other: &isize) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<usize>

Source

pub const fn const_eq(self, other: &usize) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<bool>

Source

pub const fn const_eq(self, other: &bool) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<char>

Source

pub const fn const_eq(self, other: &char) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<u8>

Source

pub const fn const_cmp(&self, other: &u8) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<u16>

Source

pub const fn const_cmp(&self, other: &u16) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<u32>

Source

pub const fn const_cmp(&self, other: &u32) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<u64>

Source

pub const fn const_cmp(&self, other: &u64) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<u128>

Source

pub const fn const_cmp(&self, other: &u128) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<usize>

Source

pub const fn const_cmp(&self, other: &usize) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<i8>

Source

pub const fn const_cmp(&self, other: &i8) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<i16>

Source

pub const fn const_cmp(&self, other: &i16) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<i32>

Source

pub const fn const_cmp(&self, other: &i32) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<i64>

Source

pub const fn const_cmp(&self, other: &i64) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<i128>

Source

pub const fn const_cmp(&self, other: &i128) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<isize>

Source

pub const fn const_cmp(&self, other: &isize) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<bool>

Source

pub const fn const_cmp(&self, other: &bool) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<char>

Source

pub const fn const_cmp(&self, other: &char) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<u8>>

Source

pub const fn const_eq(&self, other: &Option<u8>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<u8>>

Source

pub const fn const_cmp(&self, other: &Option<u8>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<i8>>

Source

pub const fn const_eq(&self, other: &Option<i8>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<i8>>

Source

pub const fn const_cmp(&self, other: &Option<i8>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<u16>>

Source

pub const fn const_eq(&self, other: &Option<u16>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<u16>>

Source

pub const fn const_cmp(&self, other: &Option<u16>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<i16>>

Source

pub const fn const_eq(&self, other: &Option<i16>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<i16>>

Source

pub const fn const_cmp(&self, other: &Option<i16>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<u32>>

Source

pub const fn const_eq(&self, other: &Option<u32>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<u32>>

Source

pub const fn const_cmp(&self, other: &Option<u32>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<i32>>

Source

pub const fn const_eq(&self, other: &Option<i32>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<i32>>

Source

pub const fn const_cmp(&self, other: &Option<i32>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<u64>>

Source

pub const fn const_eq(&self, other: &Option<u64>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<u64>>

Source

pub const fn const_cmp(&self, other: &Option<u64>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<i64>>

Source

pub const fn const_eq(&self, other: &Option<i64>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<i64>>

Source

pub const fn const_cmp(&self, other: &Option<i64>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<u128>>

Source

pub const fn const_eq(&self, other: &Option<u128>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<u128>>

Source

pub const fn const_cmp(&self, other: &Option<u128>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<i128>>

Source

pub const fn const_eq(&self, other: &Option<i128>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<i128>>

Source

pub const fn const_cmp(&self, other: &Option<i128>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<usize>>

Source

pub const fn const_eq(&self, other: &Option<usize>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<usize>>

Source

pub const fn const_cmp(&self, other: &Option<usize>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<isize>>

Source

pub const fn const_eq(&self, other: &Option<isize>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<isize>>

Source

pub const fn const_cmp(&self, other: &Option<isize>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<bool>>

Source

pub const fn const_eq(&self, other: &Option<bool>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<bool>>

Source

pub const fn const_cmp(&self, other: &Option<bool>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<char>>

Source

pub const fn const_eq(&self, other: &Option<char>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<char>>

Source

pub const fn const_cmp(&self, other: &Option<char>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Range<u8>>

Source

pub const fn const_eq(&self, other: &Range<u8>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&'a Range<u8>>

Source

pub const fn const_eq(&self, other: &'a Range<u8>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Range<u16>>

Source

pub const fn const_eq(&self, other: &Range<u16>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&'a Range<u16>>

Source

pub const fn const_eq(&self, other: &'a Range<u16>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Range<u32>>

Source

pub const fn const_eq(&self, other: &Range<u32>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&'a Range<u32>>

Source

pub const fn const_eq(&self, other: &'a Range<u32>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Range<u64>>

Source

pub const fn const_eq(&self, other: &Range<u64>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&'a Range<u64>>

Source

pub const fn const_eq(&self, other: &'a Range<u64>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Range<u128>>

Source

pub const fn const_eq(&self, other: &Range<u128>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&'a Range<u128>>

Source

pub const fn const_eq(&self, other: &'a Range<u128>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Range<usize>>

Source

pub const fn const_eq(&self, other: &Range<usize>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&'a Range<usize>>

Source

pub const fn const_eq(&self, other: &'a Range<usize>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Range<char>>

Source

pub const fn const_eq(&self, other: &Range<char>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&'a Range<char>>

Source

pub const fn const_eq(&self, other: &'a Range<char>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<RangeInclusive<u8>>

Source

pub const fn const_eq(&self, other: &RangeInclusive<u8>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<RangeInclusive<u16>>

Source

pub const fn const_eq(&self, other: &RangeInclusive<u16>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<RangeInclusive<u32>>

Source

pub const fn const_eq(&self, other: &RangeInclusive<u32>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<RangeInclusive<u64>>

Source

pub const fn const_eq(&self, other: &RangeInclusive<u64>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<RangeInclusive<u128>>

Source

pub const fn const_eq(&self, other: &RangeInclusive<u128>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<RangeInclusive<usize>>

Source

pub const fn const_eq(&self, other: &RangeInclusive<usize>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<RangeInclusive<char>>

Source

pub const fn const_eq(&self, other: &RangeInclusive<char>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<NonZeroU8>

Source

pub const fn const_eq(&self, other: &NonZeroU8) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<NonZeroU8>

Source

pub const fn const_cmp(&self, other: &NonZeroU8) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<NonZeroI8>

Source

pub const fn const_eq(&self, other: &NonZeroI8) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<NonZeroI8>

Source

pub const fn const_cmp(&self, other: &NonZeroI8) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<NonZeroU16>

Source

pub const fn const_eq(&self, other: &NonZeroU16) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<NonZeroU16>

Source

pub const fn const_cmp(&self, other: &NonZeroU16) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<NonZeroI16>

Source

pub const fn const_eq(&self, other: &NonZeroI16) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<NonZeroI16>

Source

pub const fn const_cmp(&self, other: &NonZeroI16) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<NonZeroU32>

Source

pub const fn const_eq(&self, other: &NonZeroU32) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<NonZeroU32>

Source

pub const fn const_cmp(&self, other: &NonZeroU32) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<NonZeroI32>

Source

pub const fn const_eq(&self, other: &NonZeroI32) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<NonZeroI32>

Source

pub const fn const_cmp(&self, other: &NonZeroI32) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<NonZeroU64>

Source

pub const fn const_eq(&self, other: &NonZeroU64) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<NonZeroU64>

Source

pub const fn const_cmp(&self, other: &NonZeroU64) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<NonZeroI64>

Source

pub const fn const_eq(&self, other: &NonZeroI64) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<NonZeroI64>

Source

pub const fn const_cmp(&self, other: &NonZeroI64) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<NonZeroU128>

Source

pub const fn const_eq(&self, other: &NonZeroU128) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<NonZeroU128>

Source

pub const fn const_cmp(&self, other: &NonZeroU128) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<NonZeroI128>

Source

pub const fn const_eq(&self, other: &NonZeroI128) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<NonZeroI128>

Source

pub const fn const_cmp(&self, other: &NonZeroI128) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<NonZeroUsize>

Source

pub const fn const_eq(&self, other: &NonZeroUsize) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<NonZeroUsize>

Source

pub const fn const_cmp(&self, other: &NonZeroUsize) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<NonZeroIsize>

Source

pub const fn const_eq(&self, other: &NonZeroIsize) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<NonZeroIsize>

Source

pub const fn const_cmp(&self, other: &NonZeroIsize) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<NonZeroU8>>

Source

pub const fn const_eq(&self, other: &Option<NonZeroU8>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<NonZeroU8>>

Source

pub const fn const_cmp(&self, other: &Option<NonZeroU8>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<NonZeroI8>>

Source

pub const fn const_eq(&self, other: &Option<NonZeroI8>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<NonZeroI8>>

Source

pub const fn const_cmp(&self, other: &Option<NonZeroI8>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<NonZeroU16>>

Source

pub const fn const_eq(&self, other: &Option<NonZeroU16>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<NonZeroU16>>

Source

pub const fn const_cmp(&self, other: &Option<NonZeroU16>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<NonZeroI16>>

Source

pub const fn const_eq(&self, other: &Option<NonZeroI16>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<NonZeroI16>>

Source

pub const fn const_cmp(&self, other: &Option<NonZeroI16>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<NonZeroU32>>

Source

pub const fn const_eq(&self, other: &Option<NonZeroU32>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<NonZeroU32>>

Source

pub const fn const_cmp(&self, other: &Option<NonZeroU32>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<NonZeroI32>>

Source

pub const fn const_eq(&self, other: &Option<NonZeroI32>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<NonZeroI32>>

Source

pub const fn const_cmp(&self, other: &Option<NonZeroI32>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<NonZeroU64>>

Source

pub const fn const_eq(&self, other: &Option<NonZeroU64>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<NonZeroU64>>

Source

pub const fn const_cmp(&self, other: &Option<NonZeroU64>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<NonZeroI64>>

Source

pub const fn const_eq(&self, other: &Option<NonZeroI64>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<NonZeroI64>>

Source

pub const fn const_cmp(&self, other: &Option<NonZeroI64>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<NonZeroU128>>

Source

pub const fn const_eq(&self, other: &Option<NonZeroU128>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<NonZeroU128>>

Source

pub const fn const_cmp(&self, other: &Option<NonZeroU128>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<NonZeroI128>>

Source

pub const fn const_eq(&self, other: &Option<NonZeroI128>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<NonZeroI128>>

Source

pub const fn const_cmp(&self, other: &Option<NonZeroI128>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<NonZeroUsize>>

Source

pub const fn const_eq(&self, other: &Option<NonZeroUsize>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<NonZeroUsize>>

Source

pub const fn const_cmp(&self, other: &Option<NonZeroUsize>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<NonZeroIsize>>

Source

pub const fn const_eq(&self, other: &Option<NonZeroIsize>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<NonZeroIsize>>

Source

pub const fn const_cmp(&self, other: &Option<NonZeroIsize>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Ordering>

Source

pub const fn const_eq(&self, other: &Ordering) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Ordering>

Source

pub const fn const_cmp(&self, other: &Ordering) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<Option<Ordering>>

Source

pub const fn const_eq(&self, other: &Option<Ordering>) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<Option<Ordering>>

Source

pub const fn const_cmp(&self, other: &Option<Ordering>) -> Ordering

Compares self and other for ordering.

Source§

impl<T> CmpWrapper<PhantomData<T>>

Source

pub const fn const_eq(&self, other: &PhantomData<T>) -> bool

Compares self and other for equality.

Source§

impl<T> CmpWrapper<PhantomData<T>>

Source

pub const fn const_cmp(&self, other: &PhantomData<T>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<PhantomPinned>

Source

pub const fn const_eq(&self, other: &PhantomPinned) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<PhantomPinned>

Source

pub const fn const_cmp(&self, other: &PhantomPinned) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[u16]>

Source

pub const fn const_eq(&self, other: &[u16]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[u16]>

Source

pub const fn const_cmp(&self, other: &[u16]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[u32]>

Source

pub const fn const_eq(&self, other: &[u32]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[u32]>

Source

pub const fn const_cmp(&self, other: &[u32]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[u64]>

Source

pub const fn const_eq(&self, other: &[u64]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[u64]>

Source

pub const fn const_cmp(&self, other: &[u64]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[u128]>

Source

pub const fn const_eq(&self, other: &[u128]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[u128]>

Source

pub const fn const_cmp(&self, other: &[u128]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[usize]>

Source

pub const fn const_eq(&self, other: &[usize]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[usize]>

Source

pub const fn const_cmp(&self, other: &[usize]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[i8]>

Source

pub const fn const_eq(&self, other: &[i8]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[i8]>

Source

pub const fn const_cmp(&self, other: &[i8]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[i16]>

Source

pub const fn const_eq(&self, other: &[i16]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[i16]>

Source

pub const fn const_cmp(&self, other: &[i16]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[i32]>

Source

pub const fn const_eq(&self, other: &[i32]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[i32]>

Source

pub const fn const_cmp(&self, other: &[i32]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[i64]>

Source

pub const fn const_eq(&self, other: &[i64]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[i64]>

Source

pub const fn const_cmp(&self, other: &[i64]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[i128]>

Source

pub const fn const_eq(&self, other: &[i128]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[i128]>

Source

pub const fn const_cmp(&self, other: &[i128]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[isize]>

Source

pub const fn const_eq(&self, other: &[isize]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[isize]>

Source

pub const fn const_cmp(&self, other: &[isize]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[bool]>

Source

pub const fn const_eq(&self, other: &[bool]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[bool]>

Source

pub const fn const_cmp(&self, other: &[bool]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[char]>

Source

pub const fn const_eq(&self, other: &[char]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[char]>

Source

pub const fn const_cmp(&self, other: &[char]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[&str]>

Source

pub const fn const_eq(&self, other: &[&str]) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<&[&str]>

Source

pub const fn const_cmp(&self, other: &[&str]) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[&[u8]]>

Source

pub const fn const_eq(&self, other: &[&[u8]]) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<&[&[u8]]>

Source

pub const fn const_cmp(&self, other: &[&[u8]]) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [u16]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [u16]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [u16]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [u16]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [u32]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [u32]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [u32]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [u32]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [u64]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [u64]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [u64]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [u64]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [u128]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [u128]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [u128]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [u128]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [usize]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [usize]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [usize]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [usize]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [i8]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [i8]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [i8]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [i8]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [i16]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [i16]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [i16]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [i16]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [i32]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [i32]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [i32]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [i32]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [i64]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [i64]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [i64]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [i64]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [i128]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [i128]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [i128]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [i128]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [isize]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [isize]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [isize]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [isize]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [bool]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [bool]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [bool]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [bool]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [char]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [char]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [char]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [char]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a, 'b> CmpWrapper<Option<&'a [&'b str]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [&'b str]>) -> bool

Compares self and other for equality.

Source§

impl<'a, 'b> CmpWrapper<Option<&'a [&'b str]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [&'b str]>) -> Ordering

Compares self and other for ordering.

Source§

impl<'a, 'b> CmpWrapper<Option<&'a [&'b [u8]]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [&'b [u8]]>) -> bool

Compares self and other for equality.

Source§

impl<'a, 'b> CmpWrapper<Option<&'a [&'b [u8]]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [&'b [u8]]>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&[u8]>

Source

pub const fn const_eq(&self, other: &[u8]) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<&[u8]>

Source

pub const fn const_cmp(&self, other: &[u8]) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a [u8]>>

Source

pub const fn const_eq(&self, other: &Option<&'a [u8]>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a [u8]>>

Source

pub const fn const_cmp(&self, other: &Option<&'a [u8]>) -> Ordering

Compares self and other for ordering.

Source§

impl CmpWrapper<&str>

Source

pub const fn const_eq(&self, other: &str) -> bool

Compares self and other for equality.

Source§

impl CmpWrapper<&str>

Source

pub const fn const_cmp(&self, other: &str) -> Ordering

Compares self and other for ordering.

Source§

impl<'a> CmpWrapper<Option<&'a str>>

Source

pub const fn const_eq(&self, other: &Option<&'a str>) -> bool

Compares self and other for equality.

Source§

impl<'a> CmpWrapper<Option<&'a str>>

Source

pub const fn const_cmp(&self, other: &Option<&'a str>) -> Ordering

Compares self and other for ordering.

Trait Implementations§

Source§

impl<T: Clone> Clone for CmpWrapper<T>

Source§

fn clone(&self) -> CmpWrapper<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<P> ConstCmp for CmpWrapper<P>

Source§

type Kind = IsNotStdKind

What kind of type this is, this can be one of: Read more
Source§

impl<T: Debug> Debug for CmpWrapper<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: PartialEq> PartialEq for CmpWrapper<T>

Source§

fn eq(&self, other: &CmpWrapper<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: Copy> Copy for CmpWrapper<T>

Source§

impl<T: Eq> Eq for CmpWrapper<T>

Source§

impl<T> StructuralPartialEq for CmpWrapper<T>

Auto Trait Implementations§

§

impl<T> Freeze for CmpWrapper<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for CmpWrapper<T>
where T: RefUnwindSafe,

§

impl<T> Send for CmpWrapper<T>
where T: Send,

§

impl<T> Sync for CmpWrapper<T>
where T: Sync,

§

impl<T> Unpin for CmpWrapper<T>
where T: Unpin,

§

impl<T> UnwindSafe for CmpWrapper<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

impl<T> Identity for T
where T: ?Sized,

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.