CtEq

Trait CtEq 

Source
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.

Required Methods§

Source

fn ct_eq(&self, other: &Rhs) -> Choice

Equality

Provided Methods§

Source

fn ct_ne(&self, other: &Rhs) -> Choice

Inequality

Implementations on Foreign Types§

Source§

impl CtEq for Ordering

Source§

fn ct_eq(&self, other: &Self) -> Choice

Source§

impl CtEq for i8

Source§

fn ct_eq(&self, other: &Self) -> Choice

Source§

impl CtEq for i16

Source§

fn ct_eq(&self, other: &Self) -> Choice

Source§

impl CtEq for i32

Source§

fn ct_eq(&self, other: &Self) -> Choice

Source§

impl CtEq for i64

Source§

fn ct_eq(&self, other: &Self) -> Choice

Source§

impl CtEq for i128

Source§

fn ct_eq(&self, other: &Self) -> Choice

Source§

impl CtEq for isize

Available on 32-bit or 64-bit only.
Source§

fn ct_eq(&self, other: &Self) -> Choice

Source§

impl CtEq for u8

Source§

fn ct_eq(&self, other: &Self) -> Choice

Source§

impl CtEq for u16

Source§

fn ct_eq(&self, other: &Self) -> Choice

Source§

impl CtEq for u32

Source§

fn ct_eq(&self, other: &Self) -> Choice

Source§

impl CtEq for u64

Source§

fn ct_eq(&self, other: &Self) -> Choice

Source§

impl CtEq for u128

Source§

fn ct_eq(&self, other: &Self) -> Choice

Source§

impl CtEq for usize

Available on 32-bit or 64-bit only.
Source§

fn ct_eq(&self, other: &Self) -> Choice

Source§

impl<T: CtEq> CtEq for [T]

Source§

fn ct_eq(&self, other: &[T]) -> Choice

Source§

impl<T: CtEq, const N: usize> CtEq for [T; N]

Source§

fn ct_eq(&self, other: &[T; N]) -> Choice

Implementors§

Source§

impl CtEq for Choice

Source§

impl<T: CtEq> CtEq for CtOption<T>