Skip to main content

MajorityKey

Trait MajorityKey 

Source
pub trait MajorityKey: Copy + Default {
    // Required method
    fn key_eq(self, other: Self) -> bool;
}
Expand description

A fixed-width value that a majority vote compares for equality.

The comparison must be an equivalence relation. Floats compare by bit pattern, as in NativePType::is_eq, so every NaN payload is its own value and -0.0 differs from 0.0.

Required Methods§

Source

fn key_eq(self, other: Self) -> bool

Returns whether the two values are the same value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl MajorityKey for f16

Source§

fn key_eq(self, other: Self) -> bool

Source§

impl MajorityKey for f32

Source§

fn key_eq(self, other: Self) -> bool

Source§

impl MajorityKey for f64

Source§

fn key_eq(self, other: Self) -> bool

Source§

impl MajorityKey for i8

Source§

fn key_eq(self, other: Self) -> bool

Source§

impl MajorityKey for i16

Source§

fn key_eq(self, other: Self) -> bool

Source§

impl MajorityKey for i32

Source§

fn key_eq(self, other: Self) -> bool

Source§

impl MajorityKey for i64

Source§

fn key_eq(self, other: Self) -> bool

Source§

impl MajorityKey for i128

Source§

fn key_eq(self, other: Self) -> bool

Source§

impl MajorityKey for u8

Source§

fn key_eq(self, other: Self) -> bool

Source§

impl MajorityKey for u16

Source§

fn key_eq(self, other: Self) -> bool

Source§

impl MajorityKey for u32

Source§

fn key_eq(self, other: Self) -> bool

Source§

impl MajorityKey for u64

Source§

fn key_eq(self, other: Self) -> bool

Source§

impl<const N: usize> MajorityKey for [u8; N]
where [u8; N]: Default,

Fixed-size byte strings, such as UUIDs or the 16-byte views of variable-length strings.

Source§

fn key_eq(self, other: Self) -> bool

Implementors§