pub trait ModelHooks {
// Provided methods
fn before_save(&mut self) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn after_save(&mut self) -> impl Future<Output = Result<(), Error>> + Send { ... }
}Expand description
Hooks that can be implemented to run logic before or after database operations.
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.