Skip to main content

PrimaryKey

Trait PrimaryKey 

Source
pub trait PrimaryKey: Sized {
    // Required method
    fn into_values(self) -> Vec<Value>;
}
Expand description

主键 trait - 用于 find_by_id 方法 支持单主键和复合主键

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl PrimaryKey for &str

Source§

impl PrimaryKey for String

Source§

impl PrimaryKey for i32

Source§

impl<A, B, C> PrimaryKey for (A, B, C)
where A: Into<Value>, B: Into<Value>, C: Into<Value>,

Source§

impl<A, B> PrimaryKey for (A, B)
where A: Into<Value>, B: Into<Value>,

Implementors§