identity_iota::core

Trait KeyComparable

Source
pub trait KeyComparable {
    type Key: PartialEq + ?Sized;

    // Required method
    fn key(&self) -> &Self::Key;
}
Expand description

A trait for comparing types only by a certain key.

Required Associated Types§

Source

type Key: PartialEq + ?Sized

Key type for comparisons.

Required Methods§

Source

fn key(&self) -> &Self::Key

Returns a reference to the key.

Implementations on Foreign Types§

Source§

impl KeyComparable for &str

Source§

type Key = str

Source§

fn key(&self) -> &<&str as KeyComparable>::Key

Source§

impl KeyComparable for bool

Source§

type Key = bool

Source§

fn key(&self) -> &<bool as KeyComparable>::Key

Source§

impl KeyComparable for char

Source§

type Key = char

Source§

fn key(&self) -> &<char as KeyComparable>::Key

Source§

impl KeyComparable for f32

Source§

type Key = f32

Source§

fn key(&self) -> &<f32 as KeyComparable>::Key

Source§

impl KeyComparable for f64

Source§

type Key = f64

Source§

fn key(&self) -> &<f64 as KeyComparable>::Key

Source§

impl KeyComparable for i8

Source§

type Key = i8

Source§

fn key(&self) -> &<i8 as KeyComparable>::Key

Source§

impl KeyComparable for i16

Source§

type Key = i16

Source§

fn key(&self) -> &<i16 as KeyComparable>::Key

Source§

impl KeyComparable for i32

Source§

type Key = i32

Source§

fn key(&self) -> &<i32 as KeyComparable>::Key

Source§

impl KeyComparable for i64

Source§

type Key = i64

Source§

fn key(&self) -> &<i64 as KeyComparable>::Key

Source§

impl KeyComparable for i128

Source§

type Key = i128

Source§

fn key(&self) -> &<i128 as KeyComparable>::Key

Source§

impl KeyComparable for isize

Source§

impl KeyComparable for str

Source§

type Key = str

Source§

fn key(&self) -> &<str as KeyComparable>::Key

Source§

impl KeyComparable for u8

Source§

type Key = u8

Source§

fn key(&self) -> &<u8 as KeyComparable>::Key

Source§

impl KeyComparable for u16

Source§

type Key = u16

Source§

fn key(&self) -> &<u16 as KeyComparable>::Key

Source§

impl KeyComparable for u32

Source§

type Key = u32

Source§

fn key(&self) -> &<u32 as KeyComparable>::Key

Source§

impl KeyComparable for u64

Source§

type Key = u64

Source§

fn key(&self) -> &<u64 as KeyComparable>::Key

Source§

impl KeyComparable for u128

Source§

type Key = u128

Source§

fn key(&self) -> &<u128 as KeyComparable>::Key

Source§

impl KeyComparable for usize

Source§

impl KeyComparable for String

Implementors§