pub struct Event<'a> {
pub event_id: &'a Option<&'a Uuid>,
pub event_type: &'a str,
pub payload: Cow<'a, str>,
pub payload_content_type: &'a str,
pub metadata: Option<Vec<(String, Value)>>,
pub occurred_at: Option<DateTime<Utc>>,
pub labels: Vec<(String, Value)>,
}
Expand description
An event that can be sent to Hook0
Fields§
§event_id: &'a Option<&'a Uuid>
Unique ID of the event (a UUIDv4 will be generated if nothing is provided)
event_type: &'a str
Type of the event (as configured in your Hook0 application)
payload: Cow<'a, str>
Payload
payload_content_type: &'a str
Content type of the payload
metadata: Option<Vec<(String, Value)>>
Optional key-value metadata
occurred_at: Option<DateTime<Utc>>
Datetime of when the event occurred (current time will be used if nothing is provided)
labels: Vec<(String, Value)>
Labels that Hook0 will use to route the event
Trait Implementations§
impl<'a> Eq for Event<'a>
impl<'a> StructuralPartialEq for Event<'a>
Auto Trait Implementations§
impl<'a> Freeze for Event<'a>
impl<'a> RefUnwindSafe for Event<'a>
impl<'a> Send for Event<'a>
impl<'a> Sync for Event<'a>
impl<'a> Unpin for Event<'a>
impl<'a> UnwindSafe for Event<'a>
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