pub trait PrimaryKeyToColumn {
type Column;
// Required methods
fn into_column(self) -> Self::Column;
fn from_column(column: Self::Column) -> Option<Self>
where Self: Sized;
}Expand description
The mapping between primary-key variants and column variants.
Required Associated Types§
Required Methods§
Sourcefn into_column(self) -> Self::Column
fn into_column(self) -> Self::Column
The column this key variant corresponds to.
Sourcefn from_column(column: Self::Column) -> Option<Self>where
Self: Sized,
fn from_column(column: Self::Column) -> Option<Self>where
Self: Sized,
The key variant for column, or None when the column is not part of the key.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".