pub trait ActiveModel<ModelData: ModelData>: Default {
// Required methods
async fn into_values(
self,
conn: &mut Connection,
) -> Result<Vec<NamedValue>, Error>;
fn primary(&self) -> Option<Value>;
// Provided method
async fn insert(self, conn: &mut Connection) -> Result<u64, Error>
where Self: Sized { ... }
}
Required Methods§
async fn into_values( self, conn: &mut Connection, ) -> Result<Vec<NamedValue>, Error>
fn primary(&self) -> Option<Value>
Provided Methods§
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.