Trait ActiveModel

Source
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§

Source

async fn into_values( self, conn: &mut Connection, ) -> Result<Vec<NamedValue>, Error>

Source

fn primary(&self) -> Option<Value>

Provided Methods§

Source

async fn insert(self, conn: &mut Connection) -> Result<u64, Error>
where Self: Sized,

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§