pub trait PrimaryKey:
Copy
+ Eq
+ Hash
+ Debug
+ Send
+ Sync
+ 'static
+ ToSqlValue
+ Serialize
+ DeserializeOwned {
const COLUMN_TYPE: ColumnType;
// Required methods
fn null_value() -> SqlValue;
fn from_row(row: &dyn RangoRow, col: &str) -> Result<Self, RowError>;
}Expand description
A primary key value type that a ForeignKey<M> column can hold: Uuid (the default),
i32 (FieldAutoInt / FieldInt) or i64 (FieldAutoBigInt / FieldBigInt).
Required Associated Constants§
Sourceconst COLUMN_TYPE: ColumnType
const COLUMN_TYPE: ColumnType
Type of a foreign key column pointing at this key.
Required Methods§
Sourcefn null_value() -> SqlValue
fn null_value() -> SqlValue
The SQL NULL of this type (for Option<ForeignKey<M>>).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".