pub struct HubEvent {
pub id: u64,
pub topic: String,
pub data: Value,
pub timestamp: DateTime<Utc>,
}Expand description
A hub event flowing through the pub/sub system.
Fields§
§id: u64Monotonically increasing event ID (used for Last-Event-ID replay).
topic: StringTopic the event was published to (e.g. app/marketing/events).
data: ValueArbitrary JSON payload.
timestamp: DateTime<Utc>UTC timestamp when the event was created.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HubEvent
impl<'de> Deserialize<'de> for HubEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for HubEvent
Auto Trait Implementations§
impl Freeze for HubEvent
impl RefUnwindSafe for HubEvent
impl Send for HubEvent
impl Sync for HubEvent
impl Unpin for HubEvent
impl UnsafeUnpin for HubEvent
impl UnwindSafe for HubEvent
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