Skip to main content

PrimaryKeyToColumn

Trait PrimaryKeyToColumn 

Source
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§

Source

type Column

The entity’s column enum.

Required Methods§

Source

fn into_column(self) -> Self::Column

The column this key variant corresponds to.

Source

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".

Implementors§