UniqueEntity

Trait UniqueEntity 

Source
pub trait UniqueEntity: EntityBase<ConnectionType = KeystoreDatabaseConnection> + 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 they 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§

Source§

impl UniqueEntity for ProteusIdentity

Source§

const KEY: () = ()

Source§

impl<T> UniqueEntity for T

Available on non-target_family=wasm only.
Source§

const KEY: u64 = 0u64