Skip to main content

EntityKey

Trait EntityKey 

Source
pub trait EntityKey<K>: Send + Sync {
    // Required method
    fn key(&self) -> K;
}
Expand description

通用 Key 提取 trait(用户为实体实现此 trait 以支持任意 Key 类型)

Required Methods§

Source

fn key(&self) -> K

提取主键

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§