pub struct EventMetadata {
pub event_id: String,
pub timestamp: DateTime<Utc>,
pub correlation_id: Option<String>,
pub entity_type: &'static str,
pub aggregate_id: String,
}Expand description
Infrastructure metadata attached to every CRUD event.
Carries correlation tracking, timestamps, and entity identification without polluting the entity type itself.
Fields§
§event_id: StringUnique ID for this event instance (UUID v4).
timestamp: DateTime<Utc>When the event was created (UTC).
correlation_id: Option<String>Correlation ID for distributed tracing across services.
entity_type: &'static strThe static entity type name (e.g. "order", "stored_file").
aggregate_id: StringThe entity’s aggregate root ID at the time of the event.
Implementations§
Trait Implementations§
Source§impl Clone for EventMetadata
impl Clone for EventMetadata
Auto Trait Implementations§
impl Freeze for EventMetadata
impl RefUnwindSafe for EventMetadata
impl Send for EventMetadata
impl Sync for EventMetadata
impl Unpin for EventMetadata
impl UnsafeUnpin for EventMetadata
impl UnwindSafe for EventMetadata
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