pub struct EntityEvent {
pub entity: String,
pub event_kind: EventKind,
pub old: Option<Value>,
pub new: Option<Value>,
pub timestamp: DateTime<Utc>,
}Expand description
Entity event with old and new row data.
Represents a mutation event from the database. Used by the observer pipeline
to dispatch to after:mutation triggers asynchronously.
§Dispatch Semantics
- Fire after mutation completes (mutation response already sent)
- Async dispatch: doesn’t block mutation response
- Failure doesn’t affect mutation (error logged only)
- Execution order: in declaration order from schema
Fields§
§entity: StringEntity type (e.g., “User”, “Post”).
event_kind: EventKindKind of mutation.
old: Option<Value>Old row data (None for Insert).
new: Option<Value>New row data (None for Delete).
timestamp: DateTime<Utc>Timestamp of the event.
Trait Implementations§
Source§impl Clone for EntityEvent
impl Clone for EntityEvent
Source§fn clone(&self) -> EntityEvent
fn clone(&self) -> EntityEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EntityEvent
impl RefUnwindSafe for EntityEvent
impl Send for EntityEvent
impl Sync for EntityEvent
impl Unpin for EntityEvent
impl UnsafeUnpin for EntityEvent
impl UnwindSafe for EntityEvent
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