pub struct EventEnvelope {
pub id: EventId,
pub topic: String,
pub type: String,
pub source: String,
pub tenant: TenantCtx,
pub subject: Option<String>,
pub time: DateTime<Utc>,
pub correlation_id: Option<String>,
pub payload: Value,
pub metadata: EventMetadata,
}Expand description
Generic envelope for cross-service events.
Fields§
§id: EventIdStable identifier for the event.
topic: StringLogical topic for routing (for example greentic.repo.build.status).
type: StringFully qualified event type identifier (for example com.greentic.repo.build.status.v1).
source: StringOriginator of the event (DID, URI, or service identifier).
tenant: TenantCtxTenant context propagated with the event.
subject: Option<String>Optional subject tied to the event (for example repo:my-service).
time: DateTime<Utc>Event timestamp in UTC.
correlation_id: Option<String>Optional correlation identifier to link related messages.
payload: ValueOpaque JSON payload representing the event body.
metadata: EventMetadataFree-form metadata such as idempotency keys.
Trait Implementations§
Source§impl Clone for EventEnvelope
impl Clone for EventEnvelope
Source§fn clone(&self) -> EventEnvelope
fn clone(&self) -> EventEnvelope
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EventEnvelope
impl Debug for EventEnvelope
Source§impl<'de> Deserialize<'de> for EventEnvelope
impl<'de> Deserialize<'de> for EventEnvelope
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 EventEnvelope
impl PartialEq for EventEnvelope
Source§impl Serialize for EventEnvelope
impl Serialize for EventEnvelope
impl StructuralPartialEq for EventEnvelope
Auto Trait Implementations§
impl Freeze for EventEnvelope
impl RefUnwindSafe for EventEnvelope
impl Send for EventEnvelope
impl Sync for EventEnvelope
impl Unpin for EventEnvelope
impl UnwindSafe for EventEnvelope
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)