Skip to main content

HasIdentity

Trait HasIdentity 

Source
pub trait HasIdentity<V, I: Ord> {
    // Required method
    fn identity(v: &V) -> &I;
}
Expand description

Allows extracting a unique identifier from a value.

Required Methods§

Source

fn identity(v: &V) -> &I

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§