Skip to main content

Keyed

Trait Keyed 

Source
pub trait Keyed<K> {
    // Required method
    fn key(&self) -> &K;
}
Expand description

Trait for getting the key from a Leaf value

Required Methods§

Source

fn key(&self) -> &K

Return a reference to the key of the leaf type

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<K> Keyed<K> for K