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

A Trait for any type that can be converted into an Model

Required Methods§

Source

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

Method to call to perform the conversion

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl TryIntoModel<Model> for ActiveModel

Implementors§

Source§

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