Skip to main content

Identifiable

Trait Identifiable 

Source
pub trait Identifiable {
    type Id: Hash + Eq + Clone + 'static;

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

Items with a stable identity, for for_each.

Required Associated Types§

Source

type Id: Hash + Eq + Clone + 'static

The identity type.

Required Methods§

Source

fn id(&self) -> Self::Id

This item’s identity.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§