pub enum Event {
BeforeInsert,
AfterInsert,
BeforeUpdate,
AfterUpdate,
BeforeDelete,
AfterDelete,
AfterFind,
BeforeRestore,
AfterRestore,
}Expand description
模型生命周期事件类型
与 hooks::HookEvent 类似但简化为运行时分发用的事件枚举。
Variants§
BeforeInsert
插入前
AfterInsert
插入后
BeforeUpdate
更新前
AfterUpdate
更新后
BeforeDelete
删除前
AfterDelete
删除后
AfterFind
单行查询后
BeforeRestore
软删除恢复前
AfterRestore
软删除恢复后
Implementations§
Trait Implementations§
impl Copy for Event
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more