pub trait CtEq<Rhs = Self>where
Rhs: ?Sized,{
// Required method
fn ct_eq(&self, other: &Rhs) -> Choice;
// Provided method
fn ct_ne(&self, other: &Rhs) -> Choice { ... }
}Expand description
Constant-time equality: like (Partial)Eq with Choice instead of bool.
Impl’d for: u8, u16, u32, u64, u128, usize, cmp::Ordering,
Choice, and arrays/slices of any type which also impls CtEq.
This crate provides built-in implementations for the following types:
i8,i16,i32,i64,i128,isizeu8,u16,u32,u64,u128,usizeNonZeroI8,NonZeroI16,NonZeroI32,NonZeroI64,NonZeroI128NonZeroU8,NonZeroU16,NonZeroU32,NonZeroU64,NonZeroU128cmp::OrderingChoice[T]and[T; N]whereTimplsCtEqSlice, which the previously mentioned types all do.