pub struct TriggerEnvelope {Show 17 fields
pub event_id: String,
pub event_type: String,
pub source: String,
pub schema_version: String,
pub tenant_id: TenantId,
pub subject_id: SubjectId,
pub aggregate_id: String,
pub source_sequence: Option<i64>,
pub observed_version: Option<String>,
pub occurred_at: DateTime<Utc>,
pub received_at: DateTime<Utc>,
pub watermark: Option<DateTime<Utc>>,
pub correlation_key: String,
pub dedup_key: String,
pub cursor: Option<String>,
pub payload: Value,
pub trace_context: Value,
}Expand description
Immutable source event as delivered by a trigger adapter.
Fields§
§event_id: StringSource-unique event id.
event_type: StringStable machine-readable event type.
source: StringTrigger adapter that delivered the event.
schema_version: StringProjection schema version.
tenant_id: TenantIdTenant that owns this record.
subject_id: SubjectIdSubject (user or service principal) acting on or owning this record.
aggregate_id: StringAggregate the event belongs to (for ordering).
source_sequence: Option<i64>Per-aggregate sequence from the source.
observed_version: Option<String>Version of the observed object, if any.
occurred_at: DateTime<Utc>When the event happened.
received_at: DateTime<Utc>When the receipt arrived.
watermark: Option<DateTime<Utc>>Source watermark up to which events are complete.
correlation_key: StringKey that correlates related events.
dedup_key: StringKey that deduplicates redeliveries.
cursor: Option<String>Source cursor after this event.
payload: ValueStructured payload.
trace_context: ValueDistributed tracing context.
Implementations§
Source§impl TriggerEnvelope
impl TriggerEnvelope
Sourcepub fn validate(&self) -> Result<(), ContractError>
pub fn validate(&self) -> Result<(), ContractError>
Check this contract’s invariants; returns the first violation.
Trait Implementations§
Source§impl Clone for TriggerEnvelope
impl Clone for TriggerEnvelope
Source§fn clone(&self) -> TriggerEnvelope
fn clone(&self) -> TriggerEnvelope
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 moreSource§impl Debug for TriggerEnvelope
impl Debug for TriggerEnvelope
Source§impl<'de> Deserialize<'de> for TriggerEnvelope
impl<'de> Deserialize<'de> for TriggerEnvelope
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
Source§impl PartialEq for TriggerEnvelope
impl PartialEq for TriggerEnvelope
Source§impl Serialize for TriggerEnvelope
impl Serialize for TriggerEnvelope
impl StructuralPartialEq for TriggerEnvelope
Auto Trait Implementations§
impl Freeze for TriggerEnvelope
impl RefUnwindSafe for TriggerEnvelope
impl Send for TriggerEnvelope
impl Sync for TriggerEnvelope
impl Unpin for TriggerEnvelope
impl UnsafeUnpin for TriggerEnvelope
impl UnwindSafe for TriggerEnvelope
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