Skip to main content

KeyValueLike

Trait KeyValueLike 

Source
pub trait KeyValueLike {
    type Key;
    type Value;

    // Required methods
    fn from_key_value(key: Self::Key, value: Self::Value) -> Self;
    fn key(&self) -> &Self::Key;
    fn value(&self) -> &Self::Value;
}

Required Associated Types§

Required Methods§

Source

fn from_key_value(key: Self::Key, value: Self::Value) -> Self

Source

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

Source

fn value(&self) -> &Self::Value

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§