Skip to main content

EntityKey

Trait EntityKey 

Source
pub trait EntityKey:
    Copy
    + Debug
    + Eq
    + Ord
    + FieldValue
    + 'static { }
Expand description

Marker trait for entity identity types.

Identity types:

  • Are cheap to copy
  • Are totally ordered
  • Can be converted to/from query Values

They are NOT required to be persistable.

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§

Source§

impl<T> EntityKey for T
where T: Copy + Debug + Eq + Ord + FieldValue + 'static,