Skip to main content

IKeyValue

Trait IKeyValue 

Source
pub trait IKeyValue<T, K> {
    // Required methods
    fn key(&self) -> &K;
    fn value(&self) -> &T;
}
Expand description

A key and its item (IKeyValue<TObject, TKey>, with IKey<TKey>).

Required Methods§

Source

fn key(&self) -> &K

The key (Key).

Source

fn value(&self) -> &T

The item (Value).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T, K> IKeyValue<T, K> for (K, T)

Source§

fn key(&self) -> &K

KeyValuePair<TKey, TObject>.Key.

Source§

fn value(&self) -> &T

KeyValuePair<TKey, TObject>.Value.

Implementors§