pub struct ExecutionEvent {
pub schema_version: String,
pub event_id: String,
pub execution_id: ExecutionId,
pub sequence: u64,
pub timestamp: String,
pub payload: EventPayload,
}Expand description
One event about one execution.
sequence is dense and starts at 1 within an execution: a client that has seen
sequence n knows it has missed something when the next event it reads is not n + 1,
and asks for the gap by cursor rather than reloading the world.
Fields§
§schema_version: StringThe protocol version, PROTOCOL_VERSION.
event_id: StringThe identity of this event: the execution’s id and the sequence, so a client that deduplicates needs no composite key of its own.
execution_id: ExecutionIdThe execution it is about.
sequence: u64Its position in that execution’s stream, from 1, without gaps.
timestamp: StringWhen the event was produced, RFC 3339 in UTC.
payload: EventPayloadWhat happened.
Implementations§
Source§impl ExecutionEvent
impl ExecutionEvent
Sourcepub fn new(
execution_id: ExecutionId,
sequence: u64,
payload: EventPayload,
) -> Self
pub fn new( execution_id: ExecutionId, sequence: u64, payload: EventPayload, ) -> Self
The event for an execution at a sequence, stamped now.
Trait Implementations§
Source§impl Clone for ExecutionEvent
impl Clone for ExecutionEvent
Source§fn clone(&self) -> ExecutionEvent
fn clone(&self) -> ExecutionEvent
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 ExecutionEvent
impl Debug for ExecutionEvent
Source§impl<'de> Deserialize<'de> for ExecutionEvent
impl<'de> Deserialize<'de> for ExecutionEvent
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 Eq for ExecutionEvent
Source§impl JsonSchema for ExecutionEvent
impl JsonSchema for ExecutionEvent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ExecutionEvent
impl PartialEq for ExecutionEvent
Source§fn eq(&self, other: &ExecutionEvent) -> bool
fn eq(&self, other: &ExecutionEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ExecutionEvent
impl Serialize for ExecutionEvent
impl StructuralPartialEq for ExecutionEvent
Auto Trait Implementations§
impl Freeze for ExecutionEvent
impl RefUnwindSafe for ExecutionEvent
impl Send for ExecutionEvent
impl Sync for ExecutionEvent
impl Unpin for ExecutionEvent
impl UnsafeUnpin for ExecutionEvent
impl UnwindSafe for ExecutionEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.