Trait HasActiveModel

Source
pub trait HasActiveModel: ModelData {
    type ActiveModel: ActiveModel<Self>;

    // Required method
    fn into_active_model(self) -> Self::ActiveModel;
}

Required Associated Types§

Required Methods§

Source

fn into_active_model(self) -> Self::ActiveModel

Create ActiveModel containing the model’s data.

If the model has a primary key that is auto increment, it has to be set to ActiveValue::Unset

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§