Skip to main content

PrimaryKey

Trait PrimaryKey 

Source
pub trait PrimaryKey:
    Copy
    + Eq
    + Hash
    + Send
    + Sync
    + 'static
    + QueryValue<Self>
    + FromDatabaseValue {
    // Required method
    fn generated_value() -> Option<DatabaseValue>;
}
Expand description

Supported model keys, including their automatic INSERT value.

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 i64

Implementors§