Trait Identity

Source
pub trait Identity {
    // Required methods
    fn columns() -> Vec<String>;
    fn set_column(&mut self, column: &str, value: &SqlArg) -> Result<()>;
}
Expand description

Trait to provide the entity type for a key. This is only used for ergonomics of the api.

Required Methods§

Source

fn columns() -> Vec<String>

Returns primary key columns for a given entity.

Source

fn set_column(&mut self, column: &str, value: &SqlArg) -> Result<()>

Sets the value for an identity column

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§