Skip to main content

TryIntoModel

Trait TryIntoModel 

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

Conversion of an active model back into the plain model.

Implemented by DeriveEntityModel on the generated ActiveModel.

Required Methods§

Source

fn try_into_model(self) -> Result<M>

Builds the model from the attribute values.

§Errors

Returns DbErr::AttrNotSet naming the first attribute that is NotSet.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§