pub struct EventEnvelope {
pub offset: Offset,
pub persistence_id: PersistenceId,
pub sequence_nr: SequenceNr,
pub timestamp_ms: i64,
pub adapter_manifest: String,
pub payload: SerializedPayload,
pub metadata: Option<SerializedPayload>,
pub tags: Vec<Tag>,
}Expand description
One serialized journal event emitted by a persistence query.
Fields§
§offset: OffsetBackend-local resume position for this event.
persistence_id: PersistenceIdPersistent entity identity.
sequence_nr: SequenceNrMonotonic sequence number within the persistence id.
timestamp_ms: i64Event timestamp as milliseconds since the Unix epoch.
adapter_manifest: StringDurable event-adapter manifest, separate from the serializer manifest.
payload: SerializedPayloadSerialized journal payload frame.
metadata: Option<SerializedPayload>Optional serialized event metadata frame.
Query tags attached to the stored event.
Trait Implementations§
Source§impl Clone for EventEnvelope
impl Clone for EventEnvelope
Source§impl Debug for EventEnvelope
impl Debug for EventEnvelope
impl Eq for EventEnvelope
Source§impl PartialEq for EventEnvelope
impl PartialEq for EventEnvelope
Source§impl SourceProvider<EventEnvelope> for EventsBySlicesSourceProvider
impl SourceProvider<EventEnvelope> for EventsBySlicesSourceProvider
Source§fn manifest(&self) -> &ProviderManifest
fn manifest(&self) -> &ProviderManifest
Returns the stable durable identity of this provider and cursor format.
Source§fn validate_projection_id(
&self,
projection_id: &ProjectionId,
) -> ProjectionResult<()>
fn validate_projection_id( &self, projection_id: &ProjectionId, ) -> ProjectionResult<()>
Validates that this provider may run under
projection_id. Read moreSource§fn source_from<'life0, 'life1, 'async_trait>(
&'life0 self,
cursor: Option<&'life1 ProjectionCursor>,
mode: QueryMode,
) -> Pin<Box<dyn Future<Output = ProjectionResult<ProjectionSource<EventEnvelope>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn source_from<'life0, 'life1, 'async_trait>(
&'life0 self,
cursor: Option<&'life1 ProjectionCursor>,
mode: QueryMode,
) -> Pin<Box<dyn Future<Output = ProjectionResult<ProjectionSource<EventEnvelope>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Materializes a fresh source beginning at
cursor. Read moreSource§fn extract_cursor(
&self,
envelope: &EventEnvelope,
) -> ProjectionResult<ProjectionCursor>
fn extract_cursor( &self, envelope: &EventEnvelope, ) -> ProjectionResult<ProjectionCursor>
Extracts the complete durable cursor after processing
envelope. Read moreSource§fn compare_positions(
&self,
left: &CursorPosition,
right: &CursorPosition,
) -> ProjectionResult<Ordering>
fn compare_positions( &self, left: &CursorPosition, right: &CursorPosition, ) -> ProjectionResult<Ordering>
Compares two opaque provider positions in source order. Read more
Source§fn resume_allows(
&self,
cursor: &ProjectionCursor,
envelope: &Envelope,
) -> ProjectionResult<bool>
fn resume_allows( &self, cursor: &ProjectionCursor, envelope: &Envelope, ) -> ProjectionResult<bool>
Decides whether
envelope is after the already-consumed resume cursor. Read moreimpl 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 UnsafeUnpin for EventEnvelope
impl UnwindSafe for EventEnvelope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<S> IntoEventHandlerResult<S> for S
impl<S> IntoEventHandlerResult<S> for S
Source§fn into_event_handler_result(self) -> Result<S, PersistenceError>
fn into_event_handler_result(self) -> Result<S, PersistenceError>
Converts this handler output into the runtime result.
Source§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage