Skip to main content

UniqueEntity

Trait UniqueEntity 

Source
pub trait UniqueEntity: PrimaryKey {
    const KEY: Self::PrimaryKey;
}
Expand description

A unique entity can appear either 0 or 1 times in the database.

Required Associated Constants§

Source

const KEY: Self::PrimaryKey

The id used as the key when storing this entity in a KV store.

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§