pub enum CloudEventFields {
Id,
Source,
SpecVersion,
EventType,
Subject,
Time,
DataContentType,
DataSchema,
}
Expand description
Enum representing the cloud event fields.
Variants§
Id
Identifies the event. Producers MUST ensure that source + id is unique for each distinct event. If a duplicate event is re-sent (e.g. due to a network error) it MAY have the same id. Consumers MAY assume that Events with identical source and id are duplicates.
Source
Identifies the context in which an event happened. Often this will include information such as the type of the event source, the organization publishing the event or the process that produced the event. The exact syntax and semantics behind the data encoded in the URI is defined by the event producer.
SpecVersion
The version of the CloudEvents
specification which the event uses. This enables the
interpretation of the context. Compliant event producers MUST use a value of 1.0 when
referring to this version of the specification.
EventType
Describes the type of event related to the originating occurrence. Often this attribute is used for routing, observability, policy enforcement, etc. The format of this is producer defined and might include information such as the version of the type
Subject
Identifies the subject of the event in the context of the event producer (identified by source). In publish-subscribe scenarios, a subscriber will typically subscribe to events emitted by a source, but the source identifier alone might not be sufficient as a qualifier for any specific event if the source context has internal sub-structure.
Time
Timestamp of when the occurrence happened.
If the time of the occurrence cannot be determined then this attribute MAY be set to some other time (such as the current time)
by the CloudEvents
producer,
however all producers for the same source MUST be consistent in this respect.
DataContentType
Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format.
DataSchema
Identifies the schema that data adheres to. Incompatible changes to the schema SHOULD be reflected by a different URI.
Implementations§
Trait Implementations§
Source§impl Clone for CloudEventFields
impl Clone for CloudEventFields
Source§fn clone(&self) -> CloudEventFields
fn clone(&self) -> CloudEventFields
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more