ModelHooks

Trait ModelHooks 

Source
pub trait ModelHooks {
    // Provided methods
    fn before_save<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Send + 'async_trait { ... }
    fn after_save<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: Send + 'async_trait { ... }
}

Provided Methods§

Source

fn before_save<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Send + 'async_trait,

Source

fn after_save<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Send + 'async_trait,

Implementors§

Source§

impl<T> ModelHooks for T
where T: Send + Sync,