pub trait PrimaryKeyToColumn {
type Column: ColumnTrait;
// Required methods
fn into_column(self) -> Self::Column;
fn from_column(col: Self::Column) -> Option<Self>
where Self: Sized;
}Expand description
Conversion between an entity’s PrimaryKey enum and its Column enum.
Generated alongside PrimaryKeyTrait for every entity.
Required Associated Types§
Sourcetype Column: ColumnTrait
type Column: ColumnTrait
The entity’s column enum (i.e. <Self::Entity as EntityTrait>::Column).
Required Methods§
Sourcefn into_column(self) -> Self::Column
fn into_column(self) -> Self::Column
Convert a primary-key variant into the matching column.
Sourcefn from_column(col: Self::Column) -> Option<Self>where
Self: Sized,
fn from_column(col: Self::Column) -> Option<Self>where
Self: Sized,
Reverse of into_column. Returns None if
col is not part of the primary key.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl PrimaryKeyToColumn for sea_orm::rbac::entity::permission::PrimaryKey
Available on crate feature rbac only.
impl PrimaryKeyToColumn for sea_orm::rbac::entity::permission::PrimaryKey
Available on crate feature
rbac only.Source§impl PrimaryKeyToColumn for sea_orm::rbac::entity::resource::PrimaryKey
Available on crate feature rbac only.
impl PrimaryKeyToColumn for sea_orm::rbac::entity::resource::PrimaryKey
Available on crate feature
rbac only.Source§impl PrimaryKeyToColumn for sea_orm::rbac::entity::role::PrimaryKey
Available on crate feature rbac only.
impl PrimaryKeyToColumn for sea_orm::rbac::entity::role::PrimaryKey
Available on crate feature
rbac only.Source§impl PrimaryKeyToColumn for sea_orm::rbac::entity::role_hierarchy::PrimaryKey
Available on crate feature rbac only.
impl PrimaryKeyToColumn for sea_orm::rbac::entity::role_hierarchy::PrimaryKey
Available on crate feature
rbac only.Source§impl PrimaryKeyToColumn for sea_orm::rbac::entity::role_permission::PrimaryKey
Available on crate feature rbac only.
impl PrimaryKeyToColumn for sea_orm::rbac::entity::role_permission::PrimaryKey
Available on crate feature
rbac only.Source§impl PrimaryKeyToColumn for sea_orm::rbac::entity::user_override::PrimaryKey
Available on crate feature rbac only.
impl PrimaryKeyToColumn for sea_orm::rbac::entity::user_override::PrimaryKey
Available on crate feature
rbac only.Source§impl PrimaryKeyToColumn for sea_orm::rbac::entity::user_role::PrimaryKey
Available on crate feature rbac only.
impl PrimaryKeyToColumn for sea_orm::rbac::entity::user_role::PrimaryKey
Available on crate feature
rbac only.