Skip to main content

TryIntoModel

Trait TryIntoModel 

Source
pub trait TryIntoModel<M>
where M: ModelTrait,
{ // Required method fn try_into_model(self) -> Result<M, DbErr>; }
Expand description

Fallible conversion into a ModelTrait value.

Implemented for ActiveModelTrait so a partially-filled ActiveModel can be turned into a full Model once every column is Set or Unchanged; returns DbErr::AttrNotSet otherwise.

Required Methods§

Source

fn try_into_model(self) -> Result<M, DbErr>

Attempt the conversion, returning an error if a required column is not set.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl TryIntoModel<Model> for sea_orm::rbac::entity::permission::ActiveModel

Available on crate feature rbac only.
Source§

impl TryIntoModel<Model> for sea_orm::rbac::entity::resource::ActiveModel

Available on crate feature rbac only.
Source§

impl TryIntoModel<Model> for sea_orm::rbac::entity::role::ActiveModel

Available on crate feature rbac only.
Source§

impl TryIntoModel<Model> for sea_orm::rbac::entity::role_hierarchy::ActiveModel

Available on crate feature rbac only.
Source§

impl TryIntoModel<Model> for sea_orm::rbac::entity::role_permission::ActiveModel

Available on crate feature rbac only.
Source§

impl TryIntoModel<Model> for sea_orm::rbac::entity::user_override::ActiveModel

Available on crate feature rbac only.
Source§

impl TryIntoModel<Model> for sea_orm::rbac::entity::user_role::ActiveModel

Available on crate feature rbac only.
Source§

impl<M> TryIntoModel<M> for M
where M: ModelTrait,